MCP Shipyard
← Rules catalog

MCP write tool marked readOnlyHint true: hidden side effect and review risk

A tool named create, update, send or delete must not set readOnlyHint true. Clients may skip confirmation for read-only tools.

majorannotations.write-marked-readonlyClaude, ChatGPT

Set readOnlyHint: false on tools that create, update, send or delete. The rule annotations.write-marked-readonly is a major finding for Claude and ChatGPT. Its fix text says a write tool marked read-only runs without confirmation and is a hidden side effect (ChatGPT 1.2, 6.3).

What you see

  • A scan reports annotations.write-marked-readonly per tool: "<tool>" looks like a write but readOnlyHint is true.
  • The rule decides from the first two words of the name. A leading verb such as create, update, delete, send, set, add, cancel, submit, approve or reset counts as a write.

Why it happens

  1. A shared annotation object with readOnlyHint: true was copied to every tool.
  2. A tool's name was changed from get_ to set_ without updating hints.
  3. The tool only "records" or "logs" something, and the author thought it did not count. It does: a write is any state change.

Claude's review criteria say read-only tools can run without per-call confirmation and destructive tools can require it, subject to user and organisation settings. A wrong read-only hint therefore removes a safeguard.

Check it yourself

curl -s -X POST https://mcp.acme.example/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -H "Authorization: Bearer $TOKEN" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' \
 | jq -r '.result.tools[] | select(.annotations.readOnlyHint == true) | .name' | grep -E '^(create|update|delete|send|set|add|cancel|submit|approve|reset)'

Fix

Set the hint per tool and never from a shared default:

annotations: { title: "Create shipment", readOnlyHint: false, destructiveHint: false, idempotentHint: false }

If the tool truly only reads, rename it with a read verb (get_, list_, search_) so name and hint agree. See annotations.all-identical for the blanket-annotation check and annotations.contradictory for incompatible hints.

Verify

The command prints nothing, then re-scan.

Which clients care

Claude and ChatGPT, per the rule.

Source

OpenAI plugin guidelines: https://developers.openai.com/plugins/plugin-guidelines

Claude review criteria: https://claude.com/docs/connectors/building/review-criteria

Run a free scan at https://mcpshipyard.com/scan to check every rule at once.

Check every rule at once

A free scan runs this check and the other 152 against your live URL.

Scan a server