Skip to content

Change RegisteredTool#inputSchema type from DOMString to object - #241

Open
beaufortfrancois wants to merge 2 commits into
webmachinelearning:mainfrom
beaufortfrancois:inputSchemaObject
Open

Change RegisteredTool#inputSchema type from DOMString to object#241
beaufortfrancois wants to merge 2 commits into
webmachinelearning:mainfrom
beaufortfrancois:inputSchemaObject

Conversation

@beaufortfrancois

@beaufortfrancois beaufortfrancois commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

As discussed in #237 (comment), ModelContextTool#inputSchema was defined as an object during registration, but RegisteredTool#inputSchema returned a stringified JSON schema (DOMString) from getTools().
This change aligns RegisteredTool#inputSchema to be an object (JavaScript object), matching ModelContextTool#inputSchema and the MCP Tool specification.

Hopefully we'll apply the same reasoning to executeTool(myTool, {}) instead of executeTool(myTool, '{}') in #226


Preview | Diff

Comment thread index.bs
Comment thread index.bs
beaufortfrancois added a commit to beaufortfrancois/model-context-tool-inspector that referenced this pull request Aug 13, 2026
Ensure `inputSchema` is serialized to a string when returned as an object from `document.modelContext.getTools()`, aligning with the updated WebMCP specification and Chromium implementation.

References:
- https://chromium-review.googlesource.com/c/chromium/src/+/8248081
- webmachinelearning/webmcp#241
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