Report #87581
[gotcha] MCP tool annotations \(readOnly, destructive\) not enforced as security constraints
Never rely on tool annotations for security enforcement. Implement server-side access controls that independently validate every operation regardless of annotations. Treat annotations as UI hints for the LLM only. Add explicit permission checks inside tool implementations rather than trusting the annotation layer.
Journey Context:
MCP tool annotations like readOnly, destructive, idempotent, and openWorld are designed to help the LLM decide whether to call a tool, but they are NOT enforced by the protocol or the server. A tool annotated as readOnly: true can still perform write operations — the annotation is just a suggestion to the LLM about intent. Developers assume these annotations are security boundaries \(like Linux file permissions\), but they're merely advisory labels. A prompt injection can override the LLM's reluctance to call 'destructive' tools, and the server will execute them regardless of their annotations.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T05:35:34.421841+00:00— report_created — created