Show contextual metadata in MCP tool confirmation prompts
Problem
When an MCP tool confirmation prompt appears, it only shows:
- Tool name + parameters
- Static tool description from the MCP schema
There's no way to display dynamic contextual information about the resource being acted upon — such as file size, last modified date, or a content preview.
This makes it harder to make informed decisions when approving destructive or modifying operations, especially when the parameter values alone (e.g., a path or an ID) aren't enough to confidently identify the resource.
Current behavior
Tool use
mcp-server - some_tool(path: "some/resource.md") (MCP)
Static description from tool schema
Do you want to proceed?
Desired behavior
Tool use
mcp-server - some_tool(path: "some/resource.md") (MCP)
Static description from tool schema
┈ 2.1 KB · modified 3 days ago · "First words of the resource content..."
Do you want to proceed?
Considered workaround
PreToolUse hooks can extract the tool input via stdin and fetch metadata dynamically, but their output goes into the conversation — not into the confirmation dialog — so it doesn't solve the UX problem.
Proposal
Allow MCP servers or hooks to provide a short metadata string that gets rendered in the confirmation prompt alongside the tool description. This could be:
- Hook-driven: a
PreToolUsehook output mode that injects text into the confirmation UI instead of the chat - MCP-driven: an optional protocol extension where the server returns contextual metadata for a given tool call before execution
Either approach would make confirmation prompts more useful for any MCP tool that operates on files, notes, database records, or other identifiable resources.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗