Skip to content

MCP tool calls render Unknown despite tools/list title metadata #26044

@uni-mike

Description

@uni-mike

Summary

OpenCode renders MCP tool calls as Unknown in the CLI/TUI even when the MCP server provides the standard MCP title field and annotations.title in tools/list.

Example display:

⚙ pekg_status Unknown

The tool executes successfully, but the display label makes the integration look broken.

Expected

OpenCode should use the MCP tool display title when available:

  1. tool.title
  2. tool.annotations.title
  3. fallback to tool name

Expected display for the example below:

⚙ pekg_status PeKG Status

Actual

OpenCode displays:

⚙ pekg_status Unknown

Reproduction

OpenCode version:

1.14.39

Configure a remote MCP server whose tools/list includes this tool definition:

{
  "name": "status",
  "title": "PeKG Status",
  "annotations": {
    "title": "PeKG Status",
    "readOnlyHint": true
  },
  "description": "Return KB status.",
  "inputSchema": {
    "type": "object",
    "properties": {}
  }
}

Then run:

opencode run "Call the PeKG status MCP tool once."

Observed:

⚙ pekg_status Unknown

Raw MCP verification confirms the server is sending both display fields:

{
  "name": "status",
  "title": "PeKG Status",
  "annotations": {
    "title": "PeKG Status",
    "readOnlyHint": true
  }
}

Why this matters

For MCP integrations, especially onboarding users to a new tool suite, Unknown makes a successful tool call look misconfigured or failed. The MCP spec defines title as the human-readable display name for tools, so OpenCode should preserve it in the tool-call UI state.

Spec reference

The MCP Tools spec says tools/list tool definitions include optional title; tool annotations can also include title for UI/end-user display.

Notes

The tool call result is otherwise correct. This appears to be a display/title propagation issue from MCP tools/list metadata into the rendered ToolStateCompleted.title.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions