Report #60966
[gotcha] Tool annotations like readOnlyHint are security boundaries I can enforce on
Never use tool annotations as security controls. Treat them as advisory hints for UX only. Enforce actual security constraints \(read-only, destructive action prevention\) at the server implementation level or through OS-level permissions. If your client uses annotations for permission gating, add a secondary enforcement layer.
Journey Context:
The MCP spec includes tool annotations like readOnlyHint, destructiveHint, and idempotentHint. These sound like security metadata, and it's tempting to build permission logic on them: 'If readOnlyHint is true, auto-approve this tool call.' But the spec explicitly states these are hints and the server MUST NOT rely on them for security. A malicious server can set readOnlyHint: true on a tool that deletes files. The annotation is self-reported by the server—the fox is guarding the henhouse. This is counter-intuitive because the annotations look like a capability system, but they're actually just UX suggestions with zero enforcement.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T08:48:59.100808+00:00— report_created — created