Skip to content

Reference host renders tool.name in the app header; base spec display precedence is title → annotations.title → name #767

Description

@Deathslayer89

Describe the bug

The reference host renders the header above a rendered app from the raw tool
name, ignoring title and annotations.title. In
examples/basic-host/src/index.tsx
the tool-call header is:

<span className={styles.toolName}>{toolCallInfo.tool.name}</span>

with no fallback to either title field. Claude Desktop renders the same two
spans, server name then tool name, e.g. "Slidely list_design_systems" (also
observed on claude.ai), while the tool-call row in the same conversation shows
the tool's title. Screenshot attached shows both in one frame: "Checking
slides" in the task list, "Slidely get_presentation" on the card header.

Image

The base spec defines the display precedence in
schema/2025-11-25/schema.ts:

  • Tool.annotations: "Display name precedence order is: title,
    annotations.title, then name."
  • BaseMetadata.title: "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)."
  • BaseMetadata.name: "Intended for programmatic or logical use, but used as a
    display name in past specs or fallback (if title isn't present)."

The MCP Apps specification does not say how a host labels a rendered app, so
the reference host is the only guidance implementers have.

To Reproduce

  1. Register a tool with a title, an annotations.title, and a
    _meta.ui.resourceUri pointing at a text/html;profile=mcp-app resource.
  2. Call the tool from a host built on examples/basic-host, or from Claude Desktop.
  3. Read the header rendered above the app.

Observed: the header shows the raw tool name, "Slidely list_design_systems".

Expected behavior

The header shows the tool's display name per the base spec's precedence:
"Listing design systems". The raw name could remain available in a tooltip or a
verbose view for provenance.

Logs

tools/list response (protocol 2025-11-25) for the request that produced the
rendered card, captured from the server log:

{
  "name": "list_design_systems",
  "title": "Listing design systems",
  "annotations": {
    "title": "Listing design systems",
    "readOnlyHint": false, "destructiveHint": false,
    "idempotentHint": true, "openWorldHint": false
  },
  "_meta": { "ui": { "resourceUri": "ui://slidely/chat-artifact-v4.html",
                     "visibility": ["model", "app"] } }
}

Rendered header DOM (Claude Desktop):

<span class="[unicode-bidi:plaintext]">Slidely</span>
<span class="text-muted [unicode-bidi:plaintext]"> list_design_systems</span>

Additional context

Related: anthropics/claude-code#37542 requested title in Claude Code's tool
rows and headers; closed as not planned.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions