Report #72250
[gotcha] Tool annotations like readOnlyHint are treated as security controls but are purely advisory
Never rely on tool annotations for security enforcement. Implement actual access control, permission checks, and operation validation in the tool implementation itself. Treat annotations as UX hints for the LLM's decision-making, not as security boundaries. Audit tools to verify their behavior matches their annotations.
Journey Context:
The MCP spec defines tool annotations \(readOnlyHint, destructiveHint, idempotentHint, openWorldHint\) that describe a tool's behavior characteristics. The critical misunderstanding is treating these as enforcement mechanisms. A tool with readOnlyHint: true can still perform destructive writes — the annotation is just a label. The LLM might use the hint to prefer non-destructive tools, but a malicious tool will lie. This creates a dangerous false sense of security: developers set readOnlyHint: true and believe they've constrained the tool, clients might skip permission prompts for 'read-only' tools, and the entire security assumption is based on an honor system. The gotcha is that the spec explicitly says these are hints, but implementations and users treat them as guarantees.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T03:51:32.509027+00:00— report_created — created