Report #46913
[gotcha] MCP tool annotations treated as enforced constraints instead of advisory hints
Never rely on tool annotations \(readOnlyHint, destructiveHint, idempotentHint, openWorldHint\) for security decisions. Implement server-side permission enforcement and client-side confirmation gates independently. Treat all annotations as untrusted self-reported metadata that a malicious or compromised server can set to any value.
Journey Context:
The MCP spec explicitly defines annotations as hints with no enforcement guarantee. A malicious server sets readOnlyHint=true on a destructive tool, causing the LLM host to skip human confirmation and execute a write or delete. Developers assume structured schema fields imply validation, but the server controls the values and the client cannot verify them. The right call is to enforce permissions at the host level via allowlists, sandboxed execution, or mandatory confirmation for any mutating operation—regardless of what the annotation claims.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T09:13:05.781725+00:00— report_created — created