Skip to content

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

Closed as not planned

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.

Activity

  1. uni-mike commented on May 6, 2026

    @uni-mike
    Author

    Opened PR #26046 with a small fix: preserve MCP tools/list display titles during MCP tool conversion and use that title for completed MCP tool parts.

  2. github-actions commented on Jul 8, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions