MCP Shipyard
← Rules catalog

MCP get/list/search tool missing readOnlyHint: true

Read-only MCP tools should set readOnlyHint true. Without it clients may ask for confirmation on every call. Find the tools with jq and fix the annotations.

majorannotations.read-tool-not-readonlyClaude, ChatGPT

Set readOnlyHint: true and destructiveHint: false on tools that only retrieve or compute. The rule's fix text says clients may ask for confirmation on every call to tools that are not marked read-only. The scanner reports annotations.read-tool-not-readonly as major for Claude and ChatGPT.

What you see

  • A scan reports annotations.read-tool-not-readonly: "get_order" reads data but readOnlyHint is false (or undefined).
  • Repeated approval prompts for harmless lookups. How each client words or shows them is not verified here.

Why it happens

Annotations default to the cautious reading. The MCP schema (2025-11-25) gives readOnlyHint a default of false, so a client has to assume a tool without the hint may modify its environment.

The scanner decides a tool is a read when its name starts with a read verb: get, list, search, find, read, fetch, query, lookup, describe, show, view, check, count, retrieve, browse, compare, explain, preview, export, download, whoami or ping. It only checks tools that have an annotations object (tools with none are annotations.missing). It does not contest an explicit readOnlyHint: false when the description mentions a write such as saving, sending, logging or triggering, and it skips "check" tools about checkboxes.

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(.name|test("^(get|list|search|find|read|fetch|query|lookup|describe|show|view|count|retrieve|browse)[_.-]")) | select(.annotations.readOnlyHint != true) | .name'

Fix

server.registerTool(
  "get_order_status",
  {
    description: "Returns status, carrier and delivery estimate for an order ID.",
    inputSchema: { orderId: z.string().describe("Order ID, e.g. AC-1042") },
    annotations: {
      title: "Get order status",
      readOnlyHint: true,
      destructiveHint: false,
      openWorldHint: false,
    },
  },
  handler
);

If the tool does write something, such as logging a view or consuming a credit, say so in the description and keep readOnlyHint: false. Rename it if the name overpromises. For the other direction, see annotations.destructive-not-flagged and mcp-tool-annotations-explained.

Verify

Re-run the filter and expect no output. Confirm the tool no longer prompts in the client you target.

Which clients care

Claude and ChatGPT, per the rule's platform tags.

Source

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

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