Skip to content

Spec unregisterTool(ModelContextTool)#147

Open
domfarolino wants to merge 2 commits intomainfrom
spec-unregister-tool
Open

Spec unregisterTool(ModelContextTool)#147
domfarolino wants to merge 2 commits intomainfrom
spec-unregister-tool

Conversation

@domfarolino
Copy link
Collaborator

@domfarolino domfarolino commented Mar 19, 2026

This PR specifies the first proposal in #130, which is the simples to go with for now. That approach is pending working group agreement. See https://github.com/webmachinelearning/meetings/blob/main/telcons/2026-03-19-cg-agenda.md#-webmcp.

See https://crrev.com/c/7681371 for WPTs and Chromium implementation. (Note that the WPTs there are currently listed in an "internal" directory, but they will soon be moved "externally" to appear in https://github.com/web-platform-tests/wpt).

Fixes #130.

@domfarolino domfarolino requested a review from bwalderman March 19, 2026 16:45
|registered tool|'s [=tool definition/execute steps=] is prepared to run, then set |matches| to
false.

1. Let |tool read-only hint| be true if |tool|'s {{ModelContextTool/annotations}} [=map/exists=] and
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we split out the annotation matching into a separate algorithm that this references? That should hopefully avoid issues where we add new annotations but forget to include them in the steps here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, do you think it's less likely we'll forget to add checks there than here? I'm wondering if we should just factor out a more general matching algorithm for the whole tool, so everything can go in one place, instead of being spread across two places. How do you feel about that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tool unregistration design

2 participants