Report #93691
[gotcha] Agent trusts MCP tool annotations \(readOnlyHint, destructiveHint\) for security enforcement
Never rely on tool annotations for security decisions. Implement your own client-side or server-side validation to verify that tools marked as read-only truly don't mutate state. Require explicit user confirmation for any tool that could be destructive regardless of its annotation values. Treat all tool annotations as untrusted claims by the server author.
Journey Context:
The MCP specification defines tool annotations—readOnlyHint, destructiveHint, idempotentHint, openWorldHint—as hints to help clients make UI and consent decisions. The spec explicitly states these are hints, not enforced constraints. A malicious or buggy MCP server can mark a tool that deletes files as readOnlyHint=true, and a client that trusts this annotation will auto-approve it as a safe, non-destructive operation. This is especially dangerous because developers commonly build consent flows that auto-approve read-only tools and gate destructive ones—meaning a lying annotation silently bypasses the consent flow entirely. The right approach is to treat annotations as informational at best and enforce your own security boundaries independently.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T15:50:43.327270+00:00— report_created — created