Files
claude-code-system-prompts/system-prompts/data-tool-use-display-metadata-field.md
T
2026-11-18 16:43:32 -07:00

3.2 KiB

@internal Display metadata for this message's tool_use blocks, keyed by block id. display_name is the MCP server's tool.annotations.title when provided, otherwise a readable transform of the wire name; server_display_name is the MCP server's display name (claude.ai's name for a connector, else the name its config gives, else the name the server reports, else its key); icon_url is the MCP server's directory icon URL (claude.ai connectors only); server_id is the mcpsrv_ connector id of a server provisioned by claude.ai, set by the CLI from claude.ai's own connector listing, so a client may show the call as that connector's. server_id_stamp is the X-MCP-Server-ID header value, lower-cased, of an http entry in the dynamic scope (passed in at launch or by a later mcp_set_servers push). Claude Code Remote writes the connector's uuid there when the session has one, otherwise an id it generates; the CLI checks only its shape (at most 128 characters of letters, digits, '.', '_', ':' and '-'; anything else yields no stamp), not whose it is, since a --mcp-config or SDK-host entry can write anything. A client may look it up in its own server list, treat a miss as a server it does not know (never as an error), and show a hit as the entry's claim to be that server, not as proof. They are separate fields: a server provisioned by claude.ai carries server_id, a dynamic-scope http entry server_id_stamp. Both absent for a plugin's, a repo's, a settings or an agent entry. Neither is a permission grant. tool_name is the tool's name as its server lists it, without the mcp____ prefix. artifact_publish is true on a call to a publishing tool of an Artifacts MCP entry that reaches only Anthropic's server, which the CLI tells from the entry itself, never its name. The finished call's tool_use_result usually carries the artifact's url at its top level, from which Claude Code Remote derives the artifact_id it serves. It also carries the artifact's title where the server's answer has one, and type.url, the link of the Artifact type it was made from, where this process knows it. The mark promises none of them, and any of them can come on an unmarked call. All of these are the worker's word, not proof. Sent on the main loop's own frames, never for a subagent's call. The mark goes only on a call in a reply to the sending process's own model request, so a call read back from a stored session is unmarked. In a result that this process made for a marked call, a publishing tool's output is a string or a block list, or is under content; the CLI adds the url, title and type only to a result that its own run of the tool made and no hook rewrote. A result sent from a stored session may hold any of them of its own at its top level, even where an earlier process sent the call marked. Omitted for blocks whose display label equals the wire name (built-in tools). Wrapper-level sibling — never inside message.content — so it is not replayed to the model.