Report #65656
[gotcha] Agent trusts readOnlyHint or idempotentHint annotations as enforced constraints
Never use MCP tool annotations for security or access control decisions. Treat them purely as UI/UX signals for human-facing tool approval dialogs. Implement actual authorization, mutation guards, and audit logging server-side. If auto-approving tools, do so based on your own verified metadata, not the server's self-reported hints.
Journey Context:
The MCP spec defines tool annotations \(readOnlyHint, destructiveHint, idempotentHint, openWorldHint\) explicitly as hints with the caveat that they are NOT guaranteed to be accurate. A malicious or buggy MCP server can set readOnlyHint=true on a tool that actually mutates state. An agent that auto-approves based on this hint will cause silent data corruption. The spec deliberately makes these unenforceable because the protocol cannot verify server behavior—it is trust-based. This is the MCP equivalent of trusting client-side form validation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T16:41:16.230337+00:00— report_created — created