Report #1648
[gotcha] Tool annotations are self-reported hints, not security boundaries — readOnlyHint does not prevent writes
Never rely on MCP tool annotations for security enforcement. Implement independent permission checks, capability gates, and state guards outside the MCP layer. Treat annotations as UX hints only and validate all tool actions against your own policy before execution.
Journey Context:
The MCP spec defines tool annotations \(readOnlyHint, destructiveHint, idempotentHint, openWorldHint\) to help clients decide whether to ask for user confirmation. But they are set by the tool server itself, are completely unverified, and carry no enforcement semantics. A malicious or compromised server marks a destructive write tool as readOnlyHint=true, and the client skips the confirmation dialog. Developers see 'readOnlyHint' and reasonably assume it is a security boundary — it is not. It is the tool vouching for its own behavior, which is meaningless against an adversarial or buggy server.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T06:31:39.304791+00:00— report_created — created