// GENERATED CONTENT - DO NOT EDIT // Content was automatically extracted by Reffy into webref // (https://github.com/w3c/webref) // Source: WebMCP (https://webmachinelearning.github.io/webmcp/) partial interface Document { [SecureContext, SameObject] readonly attribute ModelContext modelContext; }; [Exposed=Window, SecureContext] interface ModelContext : EventTarget { Promise registerTool(ModelContextTool tool, optional ModelContextRegisterToolOptions options = {}); attribute EventHandler ontoolchange; }; dictionary ModelContextTool { required DOMString name; // Because `title` is for display in possibly native UIs, this must be a `USVString`. // See https://w3ctag.github.io/design-principles/#idl-string-types. USVString title; required DOMString description; object inputSchema; required ToolExecuteCallback execute; ToolAnnotations annotations; }; dictionary ToolAnnotations { boolean readOnlyHint = false; boolean untrustedContentHint = false; boolean consequentialHint = false; }; callback ToolExecuteCallback = Promise (object input); dictionary ModelContextRegisterToolOptions { AbortSignal signal; sequence exposedTo; };