Report #6358
[gotcha] MCP tool marked readOnlyHint:true is performing destructive operations
Never rely on MCP tool annotations for security enforcement. Implement server-side authorization, input validation, and access control. Treat all annotations \(readOnlyHint, destructiveHint, idempotentHint, openWorldHint\) as UI hints only — they inform the LLM's decision-making but provide zero runtime guarantees.
Journey Context:
The MCP spec defines tool annotations as hints that the LLM 'should' consider, but they are not enforced constraints. A malicious or buggy server can set readOnlyHint:true on a tool that deletes files. Developers naturally assume 'hint' means 'constraint' — it does not. The LLM might respect the hint and avoid calling the tool for write operations, but nothing prevents the tool from executing destructive actions when called. Security must be enforced at the server/execution layer, never delegated to LLM behavior or client-side annotations. This is a classic confusion between policy declaration and policy enforcement.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T23:49:37.637720+00:00— report_created — created