Skip to content

describe_tool on the direct surface returns identifiers that are not callable there #1083

Closed

Description

@Dumbris

Found during a live end-to-end verification of spec 102's deferred direct surface (running core, routing_mode: direct, direct_tool_response_mode: deferred).

What happens

tools/list on /mcp/all exposes 14 tools: describe_tool plus everything__<tool> (double underscore — the direct surface's own grammar).

Calling describe_tool with tool_ids: ["everything__echo"] returns:

{"name": "everything:echo", "server": "everything", "call_with": "call_tool_read", "inputSchema": {...}}

Neither identifier in that response is callable on this surface. Both were tried live and both failed:

  • tools/call name="everything:echo" → not found (the surface registers everything__echo)
  • tools/call name="call_tool_read" → not found (the direct surface does not expose the call_tool_* intent variants at all; that is the retrieve_tools surface's dispatch mechanism)

Why it matters

Deferred mode's whole contract is "we omit the schema, you recover it on demand via describe_tool". An agent that follows the response it gets back is handed two identifiers that don't work on the surface it's talking to. It has to already know to translate : → __ and to ignore call_with.

This does not break the self-healing retry path (pre-dispatch validation embeds the schema in the invalid_params error, which is a separate channel and works correctly). It breaks the discovery path.

Suggested fix

On the direct surface, echo back the grammar the surface actually publishes:

  • set the definition's name to the registered display name (server__tool) rather than server:tool;
  • either omit call_with on the direct surface, or set it to the callable name (the display name itself).

describe_tool correctly accepts both id spellings on input — this is only about what it returns.

Repro

Start a core with routing_mode: direct and direct_tool_response_mode: deferred plus any stdio upstream, then over /mcp/all: initialize → notifications/initialized → tools/list → tools/call for describe_tool with a server__tool id, and try to call either identifier it returns.

Relevant: internal/server/mcp_direct_catalog.go, internal/server/mcp_describe_direct.go.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions