Report #64605
[gotcha] Tool marked readOnlyHint:true still deleted my file — aren't annotations enforced?
Never rely on tool annotations \(readOnlyHint, destructiveHint, idempotentHint, openWorldHint\) for security decisions. They are self-reported hints from the server, not enforced constraints. If you need to enforce read-only behavior, implement it at the OS or filesystem level \(e.g., read-only mounts, restricted permissions\). Use annotations only for UX optimization and agent decision-making heuristics, never as a security boundary.
Journey Context:
The MCP specification added tool annotations to help agents make better decisions about which tools to call. A tool can declare readOnlyHint: true to signal it doesn't modify state, or destructiveHint: true to warn about irreversible actions. The critical misunderstanding: these are self-attested claims by the server, not verified guarantees. A malicious or buggy server can mark a destructive tool as read-only, and the client has no way to verify. Developers building approval flows or permission systems around these hints are creating a false security boundary. The right approach is defense-in-depth: use annotations for agent guidance, but enforce actual constraints at the system level.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T14:55:43.227257+00:00— report_created — created