Rightshold™ Sign up

Answers · MCP security

Are MCP tool annotations like readOnlyHint a security guarantee?

Last updated

TL;DR: No. readOnlyHint, destructiveHint, idempotentHint and openWorldHint are hints a server writes about its own tools, not permissions anything enforces. The MCP specification (2025-11-25) says clients MUST consider tool annotations untrusted unless they come from trusted servers, and its schema says annotations are not guaranteed to describe tool behavior faithfully and that clients should never make tool-use decisions based on annotations from untrusted servers. A malicious or buggy server can mark a tool that deletes files as readOnlyHint: true. Use annotations from servers you trust to decide when to ask for confirmation; enforce safety elsewhere: least-privilege credentials, a client allowlist of tools, human approval for anything that writes, sends or spends, and a check that the tool definitions haven't changed since you reviewed them.

What should I check, step by step?

1. Decide which servers you trust (you run them, or you reviewed and pinned them). Only for those should annotations change how your client behaves, for example auto-approving a readOnlyHint: true tool.

  1. For every other server, apply the spec's pessimistic defaults whatever it declares: assume a tool may modify its environment (readOnlyHint defaults to false), may be destructive (destructiveHint defaults to true), isn't safe to retry (idempotentHint defaults to false) and reaches the open world (openWorldHint defaults to true).
  2. Enforce read-only where it can't be argued with: give the server a credential or database role that can only read, so a tool that lies about being read-only still can't write.
  3. Keep a human in the loop: the spec says there SHOULD always be a human able to deny tool invocations, and that clients SHOULD prompt for confirmation on sensitive operations and show tool inputs before calling.
  4. Allowlist tools in the client and turn off the ones a task doesn't need, rather than relying on a server's labels to sort them.
  5. Record the tool definitions (names, descriptions, schemas and annotations) when you review a server, and diff them on every update: an annotation flipping to readOnlyHint: true, or a new tool appearing, should trigger a fresh review.
  6. Watch combinations, not single tools: a 'read-only' tool that reads private data, one that reads untrusted content, and one that can send data out together make the lethal trifecta for data theft, even if none of them writes anything.
  7. If you build a server, set annotations accurately on every tool. Missing annotations make well-behaved clients treat your read-only tools as possibly destructive, and inaccurate ones mislead the users who trust you.

What the annotations say

Tool annotations arrived in the 2025-03-26 spec revision. ToolAnnotations has title plus four booleans: readOnlyHint (the tool does not modify its environment; default false), destructiveHint (updates may be destructive rather than additive; default true), idempotentHint (repeat calls with the same arguments have no further effect; default false) and openWorldHint (the tool interacts with an open world of external entities; default true). destructiveHint and idempotentHint are only meaningful when readOnlyHint is false.

What annotations can and can't do

The MCP maintainers' March 16, 2026 post on tool annotations describes their main use as driving confirmation prompts: a readOnlyHint: true tool from a trusted server might be auto-approved while a destructiveHint: true tool gets a confirmation step.

How do I ask Rightshold about this (free, no key)?

Add the MCP server https://www.rightshold.com/mcp to Claude, Cursor, ChatGPT, Grok or VS Code, then ask: “Before I let my client auto-approve this MCP server's 'read-only' tools, is it a listed server and have its tool definitions changed since they were recorded?”

One-click setup

{
  "tool": "precall_check",
  "arguments": {
    "url": "<the MCP server's https URL>",
    "tool": "<optional tool name>"
  }
}

Rightshold does not run tools, enforce permissions in your MCP client or verify that a tool's annotations match its behavior. Not legal advice.

What are the sources?

Related

Not legal advice. JSON · Markdown · All answers

Get a free API key in one call

No card and no email needed. 100 free credits; the license and policy checks stay free without a key.

curl -s -X POST https://www.rightshold.com/v1/accounts/signup -H "Content-Type: application/json" -d '{"accept_terms":true}'
export RIGHTSHOLD_API_KEY=rs_...   # the api_key from the reply (shown once)
curl -s https://www.rightshold.com/v1/licenses/check -H "Authorization: Bearer $RIGHTSHOLD_API_KEY" \
  -H "Content-Type: application/json" -d '{"license":"MIT","intended_use":{"commercial_use":true}}'