Repository navigation
[FEATURE]: Display MCP Tool Parameters in Permission Dialog #12111
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Problem
When MCP tools are invoked (e.g., memory_create_entities, memory_add_observations), the permission dialog only displays the tool name without showing the actual parameters being passed. This makes it difficult to understand what the tool will do and whether to approve the action.
Current behavior:
Call tool memory_create_entities
Expected behavior:
Call tool memory_create_entities
entities: [
{
name: "OpenCode",
entityType: "project",
observations: ["Uses Bun monorepo structure"]
}
]
Current Implementation
The permission prompt component (packages/opencode/src/cli/cmd/tui/routes/session/permission.tsx) has explicit display logic for built-in tools:
read- shows file pathglob- shows patterngrep- shows patternbash- shows description and commandtask- shows subagent type and descriptionwebfetch- shows URL
MCP tools fall through to a generic fallback case (line 262-264):
<Match when={true}>
<TextBody icon="⚙" title={`Call tool ` + props.request.permission} />
</Match>The input() memo (lines 128-138) already contains the tool parameters but isn't rendered in this fallback case.
Proposed Solution
Configuration Options
Add configuration to control parameter visibility:
{
"tui": {
"mcp_show_parameters": "all" | "none" | "selected",
"mcp_show_parameters_tools": ["memory_create_entities", "memory_add_observations"]
}
}Configuration modes:
all- Show parameters for all MCP tools (default for transparency)none- Hide parameters for all MCP tools (minimal UI)selected- Show parameters only for tools listed inmcp_show_parameters_tools
Implementation Approach
Modify the fallback case to conditionally display tool parameters based on config:
<Match when={true}>
{(() => {
const shouldShowParams = (() => {
const mode = sync.data.config.tui?.mcp_show_parameters ?? "all"
if (mode === "none") return false
if (mode === "all") return true
const allowedTools = sync.data.config.tui?.mcp_show_parameters_tools ?? []
return allowedTools.includes(props.request.permission)
})()
const params = shouldShowParams && Object.keys(input()).length > 0
? JSON.stringify(input(), null, 2)
: undefined
return (
<TextBody
icon="⚙"
title={`Call tool ` + props.request.permission}
description={params}
/>
)
})()}
</Match>Display Options
For parameter rendering:
- Formatted JSON view - Display parameters as indented JSON
- Key-value list - Show each parameter as a labeled field
- Smart truncation - Show first N characters with expand option for large payloads
Impact
- Improves transparency when using MCP tools
- Allows users to make informed permission decisions
- Maintains consistency with how built-in tools display their parameters
- Critical for security-sensitive operations like knowledge graph modifications
Additional Context
This affects all MCP server tools, not just memory operations. Any custom MCP tool will have this limitation.
Activity
broboa commentedon Feb 4, 2026
Related #6604
github-actions commentedon Apr 6, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.
broboa commentedon Apr 7, 2026
@thdxr can you reopen this?