Bug Description
MCP tools' output is invisible in the UI. When any MCP tool executes and returns results, the output is consumed by the LLM correctly but never rendered to the user in the terminal/app.
Root Cause
The GenericTool component in packages/ui/src/components/message-part.tsx (line 159-161) is the fallback renderer for all tools without a dedicated registered renderer — which includes all MCP tools.
export function GenericTool(props: { tool: string; status?: string; hideDetails?: boolean }) {
return <BasicTool icon="mcp" status={props.status} trigger={{ title: props.tool }} hideDetails={props.hideDetails} />
}
Problems:
- Type signature only accepts
{ tool, status, hideDetails } — no output prop
- No
children passed to BasicTool — so there's no expandable content area
- Even though
ToolPartDisplay (line 1041) passes output={part.state.output} to the rendered component, GenericTool silently drops it
In contrast, built-in tools (bash, grep, glob, list, etc.) all register custom renderers via ToolRegistry.register() that explicitly render props.output.
Steps to Reproduce
- Configure any MCP server in OpenCode
- Have the agent call any MCP tool
- Observe the UI — only the tool name is shown (with MCP icon), no output content
Expected Behavior
MCP tool output should be visible and expandable, similar to how built-in tools display their results.
Suggested Fix
Update GenericTool to accept and render the output prop:
export function GenericTool(props: ToolProps) {
return (
<BasicTool icon="mcp" status={props.status} trigger={{ title: props.tool }} hideDetails={props.hideDetails}>
<Show when={props.output}>
{(output) => (
<div data-component="tool-output" data-scrollable>
<Markdown text={output()} />
</div>
)}
</Show>
</BasicTool>
)
}
Affected Files
packages/ui/src/components/message-part.tsx — GenericTool component (line 159)
packages/ui/src/components/basic-tool.tsx — GenericTool export (line 159)
Bug Description
MCP tools' output is invisible in the UI. When any MCP tool executes and returns results, the output is consumed by the LLM correctly but never rendered to the user in the terminal/app.
Root Cause
The
GenericToolcomponent inpackages/ui/src/components/message-part.tsx(line 159-161) is the fallback renderer for all tools without a dedicated registered renderer — which includes all MCP tools.Problems:
{ tool, status, hideDetails }— nooutputpropchildrenpassed toBasicTool— so there's no expandable content areaToolPartDisplay(line 1041) passesoutput={part.state.output}to the rendered component,GenericToolsilently drops itIn contrast, built-in tools (
bash,grep,glob,list, etc.) all register custom renderers viaToolRegistry.register()that explicitly renderprops.output.Steps to Reproduce
Expected Behavior
MCP tool output should be visible and expandable, similar to how built-in tools display their results.
Suggested Fix
Update
GenericToolto accept and render theoutputprop:Affected Files
packages/ui/src/components/message-part.tsx—GenericToolcomponent (line 159)packages/ui/src/components/basic-tool.tsx—GenericToolexport (line 159)