Report #70615
[gotcha] Why did a tool marked readOnlyHint still modify or delete my data?
Never rely on MCP tool annotations \(readOnlyHint, destructiveHint, idempotentHint, openWorldHint\) for security enforcement. They are advisory hints for the LLM's tool-selection heuristics only. Implement actual access control, capability restrictions, and permission enforcement at the server or middleware layer, completely independent of annotations.
Journey Context:
The MCP spec defines an annotations object on tools with fields like readOnlyHint and destructiveHint. Developers see 'readOnly' and naturally assume the tool is safe or that the runtime prevents writes. In reality, these are purely advisory signals to help the LLM decide which tool to call — there is zero runtime enforcement. A tool with readOnlyHint: true can still delete files, send network requests, or overwrite databases. The word 'Hint' is in the spec field name, but the security implication is widely misunderstood because the naming evokes enforcement semantics. You must enforce permissions at the server implementation level and treat annotations as self-reported metadata no more trustworthy than a process declaring 'I am read-only' in a config file.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T01:06:16.600537+00:00— report_created — created