-
Notifications
You must be signed in to change notification settings - Fork 110
Description
This spec says name "is used by agents to reference the tool when making tool calls.". In the current MCP spec name is "intended for programmatic or logical use, but used as a display name in past specs". The problem is that name is something you use in code (e.g. in a 'toolactivated' event handler), but at the same time it should be shown to the user. The way the MCP spec nowadays handles this is that they added a second property called title:
name: string
Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn’t present).
title?: string
Intended for UI and end-user contexts — optimized to be human-readable and easily understood, even by those unfamiliar with domain-specific terminology.
If not provided, the name should be used for display (except for Tool, where annotations.title should be given precedence over using name, if present).
Source: https://modelcontextprotocol.io/specification/2025-11-25/schema
And to quote the MCP spec a bit more to justify the general need to show tool names to users
For trust & safety and security, there SHOULD always be a human in the loop with the ability to deny tool invocations.
Applications SHOULD:
- Provide UI that makes clear which tools are being exposed to the AI model
- Insert clear visual indicators when tools are invoked
- Present confirmation prompts to the user for operations, to ensure a human is in the loop
Source: https://modelcontextprotocol.io/specification/2025-11-25/server/tools
Also: Are diacritics and spaces allowed in name? I vaguely recall that many MCP clients don't allow that, but neither the MCP spec nor the WebMCP spec seems to put any limit on it.
Lastly: The above was a real hurdle I hit when trying to link up some code to WebMCP: Description should probably be localized based on the locale of the page, but then you either localize name as well (gets weird in code) or you don't and you have english mixed into the text shown to the user.