From 4c85bc7fe98619a1a5353b0b260d02c70ee2bc0a Mon Sep 17 00:00:00 2001 From: Dominic Farolino Date: Tue, 26 May 2026 11:27:10 -0700 Subject: [PATCH] WebMCP: Implement tool title Per https://github.com/webmachinelearning/webmcp/pull/152, this CL implements the `title` property for registered tools, consistent with MCP's tool definition [1]. This is done by adding a new `title` property to the `ModelContextTool` dictionary for imperative tools, and a new `tooltitle` attribute for declarative tools. A subsequent spec PR will be made to spec the `getTools()` API and the reflect the fact that `RegisteredTool#title` is always non-undefined, and is the empty string when not provided on registration time, per some discussion we had about the right API shape. [1]: https://modelcontextprotocol.io/specification/2025-11-25/server/tools#tool R=masonf Bug: 489045948 Change-Id: If848ba85ba1b4aeaa39834eca11ba91108e493c0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7742044 Commit-Queue: Dominic Farolino Reviewed-by: Mason Freed Cr-Commit-Position: refs/heads/main@{#1636305} --- ...oolchange-on-attribute-mutation.https.html | 110 ++++++++++++++++++ .../imperative/register-tool-title.https.html | 60 ++++++++++ 2 files changed, 170 insertions(+) create mode 100644 webmcp/declarative/toolchange-on-attribute-mutation.https.html create mode 100644 webmcp/imperative/register-tool-title.https.html diff --git a/webmcp/declarative/toolchange-on-attribute-mutation.https.html b/webmcp/declarative/toolchange-on-attribute-mutation.https.html new file mode 100644 index 00000000000000..1ee85331ed4089 --- /dev/null +++ b/webmcp/declarative/toolchange-on-attribute-mutation.https.html @@ -0,0 +1,110 @@ + + +WebMCP: toolchange event and getTools() update on form attribute mutation + + + + + + +
+ +
+ + + diff --git a/webmcp/imperative/register-tool-title.https.html b/webmcp/imperative/register-tool-title.https.html new file mode 100644 index 00000000000000..8d66238b23586d --- /dev/null +++ b/webmcp/imperative/register-tool-title.https.html @@ -0,0 +1,60 @@ + + + +Tool title is exposed correctly + + + + + + + + + + +