Codify MCP tool name requirements and add title#152
Codify MCP tool name requirements and add title#152domfarolino merged 9 commits intowebmachinelearning:mainfrom
Conversation
Co-authored-by: Dominic Farolino <[email protected]>
|
First of all: Apologies for wasting your time and thank you for being kind about it. Sincerely hope I did better this time 😅. Anyway, I included the checks in the |
domfarolino
left a comment
There was a problem hiding this comment.
Don't sweat it, specs are hard! Thanks for the contribution.
|
I've pushed a couple small changes to make this more spec idiomatic. Can you take a look @DavidMulder0? |
|
Thank you! Just fixed a typo and a missing verb. |
domfarolino
left a comment
There was a problem hiding this comment.
Thanks a lot! I've prepared https://crrev.com/c/7744064 and https://crrev.com/c/7742044 to implement these changes in Chromium, and provide web platform tests for them.
SHA: 1380910 Reason: push, by domfarolino Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
The spec PR webmachinelearning/webmcp#152 is tightening tool name validation to match what the MCP specification accepts [1], and we think it's reasonable for the web platform to throw exceptions when tool names do not match this criteria, which is what this CL does. [1]: https://modelcontextprotocol.io/specification/2025-11-25/server/tools#tool-names R=masonf Bug: 489045948 Change-Id: I7d1af5d8cd18e5be7db5ddc9f9ce6d28e73cfd3f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7744064 Commit-Queue: Dominic Farolino <[email protected]> Reviewed-by: Mason Freed <[email protected]> Cr-Commit-Position: refs/heads/main@{#1625865}
The spec PR webmachinelearning/webmcp#152 is tightening tool name validation to match what the MCP specification accepts [1], and we think it's reasonable for the web platform to throw exceptions when tool names do not match this criteria, which is what this CL does. [1]: https://modelcontextprotocol.io/specification/2025-11-25/server/tools#tool-names R=masonf Bug: 489045948 Change-Id: I7d1af5d8cd18e5be7db5ddc9f9ce6d28e73cfd3f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7744064 Commit-Queue: Dominic Farolino <[email protected]> Reviewed-by: Mason Freed <[email protected]> Cr-Commit-Position: refs/heads/main@{#1625865}
The spec PR webmachinelearning/webmcp#152 is tightening tool name validation to match what the MCP specification accepts [1], and we think it's reasonable for the web platform to throw exceptions when tool names do not match this criteria, which is what this CL does. [1]: https://modelcontextprotocol.io/specification/2025-11-25/server/tools#tool-names R=masonf Bug: 489045948 Change-Id: I7d1af5d8cd18e5be7db5ddc9f9ce6d28e73cfd3f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7744064 Commit-Queue: Dominic Farolino <[email protected]> Reviewed-by: Mason Freed <[email protected]> Cr-Commit-Position: refs/heads/main@{#1625865}
Addressing #145 and #133 .
(Related topic: some guidance regarding localization would be great.
namedoes not have to be localized presumably (it won't be shown to the user presumably).titlemay be localized. Willdescriptionbe shown to the end user? From personal experience I am treating that as a solid 'no' (all MCP descriptions I have written so far were 'prompt engineered'). Lastly I have seen the tool arguments get presented to the user relatively often, so should there be a way to localize the display of those?)