Skip to content

Chore: Abstract and make more canonical for webmcp#8

Merged
ryan-roemer merged 3 commits into
mainfrom
chore/webmcp-misc
Mar 17, 2026
Merged

Chore: Abstract and make more canonical for webmcp#8
ryan-roemer merged 3 commits into
mainfrom
chore/webmcp-misc

Conversation

@ryan-roemer

@ryan-roemer ryan-roemer commented Mar 17, 2026

Copy link
Copy Markdown
Contributor
  • Introduces public/app/data/tools/index.js exporting a TOOLS array and moves the search tool into public/app/data/tools/search.js.
  • Updates WebMCP tool registration (webmcp.js) to register all tools from TOOLS.
  • Updates the iframe MCP server (iframe-server.js) to list tools from TOOLS and route tool calls by tool name.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors WebMCP tool registration to use a shared, canonical TOOLS registry, so both the WebMCP runtime and the iframe MCP server consume the same tool definitions.

Changes:

  • Introduces public/app/data/tools/index.js exporting a TOOLS array and moves the search tool into public/app/data/tools/search.js.
  • Updates WebMCP tool registration (webmcp.js) to register all tools from TOOLS.
  • Updates the iframe MCP server (iframe-server.js) to list tools from TOOLS and route tool calls by tool name.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
public/app/data/webmcp.js Switches from a single hardcoded tool registration to registering all tools in TOOLS.
public/app/data/tools/search.js Converts the prior schema/executor split into a single searchTool object with execute.
public/app/data/tools/index.js Adds the canonical tool registry (TOOLS).
public/app/data/iframe-server.js Lists tools from TOOLS and updates tools/call dispatch logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread public/app/data/iframe-server.js
Comment thread public/app/data/iframe-server.js Outdated
Comment thread public/app/data/iframe-server.js Outdated
@ryan-roemer ryan-roemer merged commit 8a547e7 into main Mar 17, 2026
1 check passed
@ryan-roemer ryan-roemer deleted the chore/webmcp-misc branch March 17, 2026 22:37
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