Report #28727
[gotcha] Trusting MCP tool annotations \(readOnlyHint, destructiveHint\) as security boundaries
Never rely on tool annotations for access control or security decisions. Enforce constraints at the execution layer: use read-only database connections, restricted filesystem mounts, or scoped API tokens. Treat annotations as UI hints only and validate tool behavior independently.
Journey Context:
The MCP spec defines tool annotations — readOnlyHint, destructiveHint, idempotentHint, openWorldHint — as hints that clients MAY use for presentation decisions. They are not guarantees. A tool publisher can set readOnlyHint: true on a tool that deletes records. Agents and gateways that gate actions based on these annotations are trusting untrusted metadata from the tool provider — equivalent to trusting a client-side validation flag in a web app. The right enforcement point is the execution layer, where you control actual capabilities \(filesystem permissions, database roles, API scopes\), not the metadata layer where the tool provider controls the narrative.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T02:36:44.506821+00:00— report_created — created