@shopify/dev-mcp: add readOnlyHint to read-only tools so they don't prompt on every call in plan mode
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 80/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- node.js, typescript
- Domain
- devtools
Research direction
Grep the dev-mcp package for registerTool("search_docs_chunks" to find where the five tools are registered; the same file (or a sibling per-tool module) holds the other four. Add the annotations objects from the issue's table to search_docs_chunks, learn_shopify_api, validate and validate_theme, leaving feedback unannotated. Done is the reproduction tools/list probe printing non-null readOnlyHint for exactly those four tools.
Written by the indexing model from the issue text.
Description
Summary
@shopify/dev-mcp 1.19.0 returns no annotations for any of its five tools in tools/list. MCP clients that gate on tool annotations therefore have to treat every call, including a plain docs search, as potentially state-changing.
Impact
In Claude Code's plan mode (its read-only research mode), MCP tools that the server marks readOnlyHint: true run without asking (docs). Every other MCP tool prompts for approval on each call, and those prompts don't offer "Always allow". As a result, each search_docs_chunks, learn_shopify_api and validate call during planning needs its own manual approval, even though looking up docs is exactly what plan mode is for. Other docs servers such as @upstash/context7-mcp already set readOnlyHint: true and run without prompts.
Reproduction
{ printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"probe","version":"0"}}}' \
'{"jsonrpc":"2.0","method":"notifications/initialized"}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/list"}'; sleep 5; } \
| npx -y @shopify/[email protected] | jq -c 'select(.id==2) | .result.tools[] | {name, annotations}'
Output:
{"name":"feedback","annotations":null}
{"name":"learn_shopify_api","annotations":null}
{"name":"search_docs_chunks","annotations":null}
{"name":"validate","annotations":null}
{"name":"validate_theme","annotations":null}
Suggested fix
Based on the tool descriptions, four of the five tools only read. Annotating them would let clients run them in read-only modes:
| Tool | Suggested annotations |
|---|---|
search_docs_chunks |
readOnlyHint: true, openWorldHint: true |
learn_shopify_api |
readOnlyHint: true, openWorldHint: true |
validate |
readOnlyHint: true |
validate_theme |
readOnlyHint: true (it reads theme files; it doesn't modify them) |
feedback |
leave unannotated, since it submits data to Shopify |
With the MCP TypeScript SDK this is the annotations field on registerTool:
server.registerTool("search_docs_chunks", {
description: "...",
inputSchema: { /* ... */ },
annotations: { readOnlyHint: true, openWorldHint: true },
}, handler);
Environment
@shopify/dev-mcp1.19.0 (latest at time of writing), run withnpx -y @shopify/dev-mcp@latest- Claude Code 2.1.330 (desktop app), macOS
- Dominant language
- JavaScript
- Stars
- 652
- Forks
- 88
- Avg merge
- 6m
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Shopify/Shopify-AI-Toolkit
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
-
Hermes install: join the download and run with && so a failed fetch cannot run a stale installerOpen
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
All issues in Shopify/Shopify-AI-Toolkit
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
cloudflare/workers-sdk#17139 ·
Maintainers usually reply within 1 day
-
area: editor P3 type: feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
halisonworks/mod-codeling#290 ·
Maintainers usually reply within 1 day
-
Teams conversion crashes on channel messages sent by an applicationPossibly taken @sdivyanshu90 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
aws/aws-sdk-js-v3#8441 ·
Maintainers usually reply within 1 day