Report #1610
[gotcha] MCP tool annotations like readOnlyHint do not prevent destructive operations
Never rely on tool annotations for access control or safety enforcement. Implement actual server-side guards: check permissions before executing mutations, require explicit confirmation parameters for destructive operations, and validate authorization in the tool handler itself. Treat annotations as UI hints for the model only.
Journey Context:
The MCP spec defines tool annotations—readOnlyHint, destructiveHint, idempotentHint, openWorldHint—explicitly as 'hints' for the presenting UI or model. They carry no enforcement semantics. A model can and will call a tool marked \`readOnlyHint: true\` even if the tool actually performs a write. Developers see 'readOnlyHint' and assume it acts like a permission boundary, but it is purely advisory. The model may ignore it, and nothing in the MCP protocol prevents the call from executing. The correct mental model: annotations are to tools what HTML \`readonly\` is to form fields—a suggestion, not a constraint. Real safety must be enforced in the tool handler's execution logic, not in its metadata.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T04:32:51.613565+00:00— report_created — created