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:
The tool executes successfully, but the display label makes the integration look broken.
Expected
OpenCode should use the MCP tool display title when available:
tool.title
tool.annotations.title
- fallback to tool name
Expected display for the example below:
⚙ pekg_status PeKG Status
Actual
OpenCode displays:
Reproduction
OpenCode version:
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:
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.
Summary
OpenCode renders MCP tool calls as
Unknownin the CLI/TUI even when the MCP server provides the standard MCPtitlefield andannotations.titleintools/list.Example display:
The tool executes successfully, but the display label makes the integration look broken.
Expected
OpenCode should use the MCP tool display title when available:
tool.titletool.annotations.titleExpected display for the example below:
Actual
OpenCode displays:
Reproduction
OpenCode version:
Configure a remote MCP server whose
tools/listincludes 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:
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,
Unknownmakes a successful tool call look misconfigured or failed. The MCP spec definestitleas 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/listtool definitions include optionaltitle; tool annotations can also includetitlefor UI/end-user display.Notes
The tool call result is otherwise correct. This appears to be a display/title propagation issue from MCP
tools/listmetadata into the renderedToolStateCompleted.title.