@shopify/dev-mcp: add readOnlyHint to read-only tools so they don't prompt on every call in plan mode
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 80/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- node.js, typescript
- 領域
- devtools
調査の方向性
dev-mcp パッケージで registerTool("search_docs_chunks" を grep し、5 つのツールが登録されている場所を見つける。同じファイル(またはツールごとの兄弟モジュール)に残り 4 つが入っている。issue の表にある annotations オブジェクトを search_docs_chunks、learn_shopify_api、validate、validate_theme に追加し、feedback は注釈なしのままにする。完了とは、再現用の tools/list プローブが、まさにこれら 4 つのツールについて非 null の readOnlyHint を出力することである。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- JavaScript
- スター
- 652
- フォーク
- 88
- 平均マージ
- 6分
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Shopify/Shopify-AI-Toolkit のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
-
Hermes install: join the download and run with && so a failed fetch cannot run a stale installerオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
Shopify/Shopify-AI-Toolkit の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
cloudflare/workers-sdk#17139 ·
メンテナーはふだん 1 日以内に返信
-
area: editor P3 type: feature
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
halisonworks/mod-codeling#290 ·
メンテナーはふだん 1 日以内に返信
-
Teams conversion crashes on channel messages sent by an application対応中かも @sdivyanshu90 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
aws/aws-sdk-js-v3#8441 ·
メンテナーはふだん 1 日以内に返信