Expand description
MCP tool-name parsing and building.
Pure string functions over tool name spellings, with no dependency on the tool system. This is the single home for MCP name shapes so the agent runtime, policy gates, and transcript display never fork the parsing.
§MCP Tool Name Format
Canonical form is mcp::<provider>::<tool_name>.
Model-visible form is mcp__<provider>__<tool>.
Legacy form is mcp_<provider>_<tool_name>.
Constants§
- MCP_
QUALIFIED_ TOOL_ PREFIX - The MCP tool name prefix used in model-visible form.
Functions§
- is_
legacy_ mcp_ tool_ name - Check if a tool name uses the legacy MCP format (
mcp_<provider>_<tool>). - legacy_
mcp_ tool_ name - Extract the tool name from a legacy MCP tool name.
- model_
visible_ mcp_ tool_ name - Build a model-visible MCP tool name from provider and tool name.
- parse_
canonical_ mcp_ tool_ name - Parse a canonical MCP tool name of the form
mcp::<provider>::<tool_name>.