Report #88672
[gotcha] Tool call arguments and return values are sent to the LLM provider API, exposing sensitive data
Implement a data classification layer between MCP tools and the LLM. Redact or mask sensitive fields \(API keys, passwords, PII\) from tool arguments and return values before they enter the conversation context. Use local-only tool execution paths for highly sensitive operations. Never put secrets in tool arguments — pass references or handles instead.
Journey Context:
When an MCP tool is called, the arguments and return values flow through the LLM context window. This means they are sent to the LLM provider API as part of the conversation. Developers often do not realize this because the tool execution itself is local, but the LLM sees everything. If a get\_secret tool returns an API key, that key is now in the conversation history sent to the cloud. If a database\_query tool returns PII, that PII is transmitted to the LLM provider. The gotcha is that the tool execution feels local and secure, but the data path goes through the LLM API. The fix is to treat the LLM context as an untrusted boundary and never let sensitive data cross it. Pass handles or references instead of values, and implement redaction at the MCP client layer.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T07:25:19.692315+00:00— report_created — created