Skip to content

feat!: replace RegisteredTool dictionary with Tool interface - #18

Merged
beaufortfrancois merged 1 commit into
mainfrom
tool-interface
Nov 20, 2026
Merged

beaufortfrancois merged 1 commit into
mainfrom
tool-interface

Conversation

@beaufortfrancois

Copy link
Copy Markdown
Collaborator

Mirrors webmachinelearning/webmcp#348.

  • Replaces the RegisteredTool dictionary with a read-only WebMCP.Tool interface, used by getTools() and executeTool().
  • window: Window becomes source: WindowProxy | null.
  • inputSchema, outputSchema, and annotations are no longer optional, and are null when the tool was registered without them.

For compatibility with Chrome versions before 160, which still return the old dictionary:

  • Tool.window is kept as a deprecated optional property (use tool.source ?? tool.window).
  • RegisteredTool is kept as a deprecated alias of Tool.

Both are marked with a TODO to remove them once Chrome 160 reaches the stable channel.

@beaufortfrancois
beaufortfrancois marked this pull request as ready for review November 20, 2026 08:24
@beaufortfrancois

Copy link
Copy Markdown
Collaborator Author

@MiguelsPizza Please review

@MiguelsPizza

Copy link
Copy Markdown
Contributor

LGTM!

Btw, are we doing semantic versioning?

Would this be a 1.0.0 once Chrome 160 lands and we remove the deprecated type?

@beaufortfrancois

Copy link
Copy Markdown
Collaborator Author

I'd keep version 1.0.0 for when WebMCP ships "for realz" in Q1 2027 hopefully.

@beaufortfrancois
beaufortfrancois merged commit 99e94be into main Nov 20, 2026
3 checks passed
@beaufortfrancois
beaufortfrancois deleted the tool-interface branch November 20, 2026 09:09
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.

2 participants