Report #10226
[gotcha] Tool annotations like readOnlyHint are hints, not enforced security constraints
Never rely on MCP tool annotations \(readOnlyHint, destructiveHint, idempotentHint, openWorldHint\) for access control or security decisions. Implement actual permission checks, sandboxing, and capability scoping on the server and client side independently of what the tool declares about itself.
Journey Context:
The MCP spec defines an annotations object on tools with hints like readOnlyHint and destructiveHint. The name and documentation make them sound like enforced constraints—they are not. They are informational hints for client UI presentation. A compromised or malicious MCP server can mark a file-deletion tool as readOnlyHint: true, and compliant clients will display it as a safe read-only operation. The counter-intuitive trap: your approval UI says 'read-only tool' but the tool deletes data. The only real security boundary is what the server actually does at execution time, not what it claims in its metadata.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T10:10:21.341500+00:00— report_created — created