Files
sousa-gecko/testing/web-platform/tests/interfaces/webmcp.idl
T
github-actions[bot] 94f89476bd Bug 2048996 [wpt PR 60753] - Sync interfaces/ with @webref/idl 3.81.1, a=testonly
Automatic update from web-platform-tests
Sync interfaces/ with @webref/idl 3.81.1 (#60753)

Co-authored-by: wpt-pr-bot <wpt-pr-bot@users.noreply.github.com>
--

wpt-commits: 8c3a65eb65d581f58ab5af381ca94182ed8399b6
wpt-pr: 60753
2026-06-25 17:01:30 +00:00

39 lines
1.1 KiB
Plaintext

// 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<undefined> 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;
};
callback ToolExecuteCallback = Promise<any> (object input);
dictionary ModelContextRegisterToolOptions {
AbortSignal signal;
sequence<USVString> exposedTo;
};