Conversation
…ack signature - Mark inputSchema as optional in ModelContextTool contract, matching the WebMCP spec IDL (object inputSchema; without required keyword) - Document that each required/optional field is labeled as such - Replace 'ToolExecuteCallback can be asynchronous' with the full typed signature per the spec IDL: (input: object, client: ModelContextClient) => Promise<any> - Document UserInteractionCallback as a zero-argument async function () => Promise<any>, matching the spec IDL definition Source: https://webmachinelearning.github.io/webmcp/#model-context-tool (§4.2.1 ModelContextTool Dictionary) Source: https://webmachinelearning.github.io/webmcp/#callbackdef-userinteractioncallback (§4.2.2 UserInteractionCallback) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@copilot implement this input too: A tool should require the same level of ownership as unregistering an event listener. To prevent scripts from inadvertently or maliciously unregistering tools they did not create, unregisterTool() is now removed. Starting from Chrome 148.0.7757.0, the registerTool() API has been updated to support an optional AbortSignal. Aborting this signal will now trigger the tool's unregistration. Full technical details are available in PR #147. To ensure a smooth transition and maintain compatibility over the next few releases, we recommend implementing a wrapper similar to the one provided below. You can also refer to PR #104 to see how we've updated some WebMCP demos. const controller = new AbortController(); navigator.modelContext.registerTool(myTool, { signal: controller.signal }); // Unregister tool later... navigator.modelContext.unregisterTool?.(myTool.name); controller.abort(); |
…terTool removal (Chrome 148) Agent-Logs-Url: https://github.com/webmaxru/agent-skills/sessions/a9ff1dc0-d256-48a3-a988-9a1f0a909978 Co-authored-by: webmaxru <1560278+webmaxru@users.noreply.github.com>
…tting Agent-Logs-Url: https://github.com/webmaxru/agent-skills/sessions/a9ff1dc0-d256-48a3-a988-9a1f0a909978 Co-authored-by: webmaxru <1560278+webmaxru@users.noreply.github.com>
... Implemented in
|
Reconciled
skills/webmcp/references/webmcp-reference.mdagainst the current WebMCP Community Group Draft (9 March 2026) fetched from (webmachinelearning.github.io/redacted), and updated all three skill files to reflect the Chrome 148 tool lifecycle change.Material Deltas
1.
inputSchemamarked optionalBefore:
inputSchema: JSON Schema-like object describing the expected input.After:
inputSchema: optional JSON Schema object describing the expected input; omit when the tool takes no structured input.Source: (webmachinelearning.github.io/redacted) — IDL shows
object inputSchema;without therequiredkeyword, and theregisterTool()algorithm (§4.2) explicitly branches on "If tool'sinputSchemaexists" before attempting serialization.2.
required/optionallabels added to ModelContextTool fieldsAdded explicit
(required)/(optional)markers forname,description,execute, andannotations.readOnlyHint.Source: (webmachinelearning.github.io/redacted) —
name,description, andexecutecarry therequiredkeyword;inputSchemaandannotationsdo not.3.
ToolExecuteCallbacksignature documentedBefore: "The
ToolExecuteCallbackcan be asynchronous."After: "The
ToolExecuteCallbacksignature is(input: object, client: ModelContextClient) => Promise<any>and may be asynchronous."Source: (webmachinelearning.github.io/redacted) —
callback ToolExecuteCallback = Promise<any> (object input, ModelContextClient client);4.
UserInteractionCallbackzero-argument contract documentedBefore: requestUserInteraction described without callback signature.
After: "The
callbackargument is a zero-argument async function() => Promise<any>that performs the user-facing step and resolves with the interaction result."Source: (webmachinelearning.github.io/redacted) —
callback UserInteractionCallback = Promise<any> ();5.
unregisterTool()removal andAbortSignal-based tool lifecycle (Chrome 148)Before:
registerTool(tool)with no lifecycle option;unregisterTool(name)used for removal.After:
registerTool(tool, { signal })accepts an optionalAbortSignal; aborting the signal unregisters the tool.unregisterTool()is removed starting Chrome148.0.7757.0. A transition-window pattern callsunregisterTool?.(name)(optional chaining) thencontroller.abort()to support both old and new browsers.Source: Chrome
148.0.7757.0/ webmachinelearning/webmcp PR #147.assets/model-context-registry.template.tsupdated:registerWebMcpTools()now creates a singleAbortController, passes{ signal: controller.signal }to everyregisterTool()call, anddispose()calls bothunregisterTool?.()andcontroller.abort()for cross-version compatibility.Files Changed
skills/webmcp/references/webmcp-reference.mdskills/webmcp/references/compatibility.mdskills/webmcp/assets/model-context-registry.template.tsValidation
python .github/skills/skill-creator/scripts/validate-metadata.py→ SUCCESSRemaining Risks
declarative-api.mdreflects preview/implementation behavior; this divergence is expected and noted in the skill's precedence rules.compatibility.mdcome from preview materials, not the spec. These could not be validated from the spec alone and are left unchanged except for the Chrome 148 AbortSignal addition.📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.