sequential-thinking: readOnlyHint and idempotentHint annotations are inaccurate (server is stateful, non-idempotent)
メンテナーはふだん 1 日以内に返信
@Jack11111eee がすでに取り組んでいます。
2026年8月30日 から。
評価
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 初心者へのやさしさ
- 88/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- api
調査の方向性
src/sequentialthinking/index.ts のツールアノテーションから始め、次に src/sequentialthinking/lib.ts で参照されている状態フィールドとミューテーションを読みます。メタデータがサーバーのステートフルな動作と一致していること、および変更の完了時に読み取り専用とべき等性に関する主張が正確であることを確認してください。
索引モデルが issue の本文から書いたものです。
説明
Summary
The sequentialthinking tool annotations readOnlyHint: true and idempotentHint: true are inaccurate. The server is stateful and non-idempotent — it maintains per-session thoughtHistory and branches instance state that persists across calls and changes on every invocation.
These annotations were added per #3403's suggestion, but the suggested values were not verified against the server's actual stateful behavior.
Evidence (BETS cycle, 2026-08-30)
Ran a governed Benchmarking/Evaluation/Testing/Standards (BETS) cycle against @modelcontextprotocol/server-sequential-thinking (published npm version, via npx -y). 11 test cases across 4 lanes.
readOnlyHint: true is misleading
The SequentialThinkingServer class (confirmed in src/sequentialthinking/lib.ts on main) holds instance state:
private thoughtHistory: ThoughtData[] = [](line 23-24)private branches: Record<string, ThoughtData[]> = {}(line 25-26)
Each processThought call mutates this state:
this.thoughtHistory.push(input)(line 101) — appends to history on every callthis.branches[input.branchId].push(input)(line 111-112) — appends to branch whenbranchFromThought+branchIdprovided
Observed across 11 calls in one session: thoughtHistoryLength incremented linearly (1, 2, 3, ... 11). The server is not read-only — it accumulates session state with each invocation.
idempotentHint: true is false
A tool is idempotent if repeated calls with the same arguments produce the same result. Calling sequentialthinking twice with identical arguments produces different thoughtHistoryLength values (N, then N+1) and potentially different branches contents. The tool is non-idempotent by definition.
Suggested fix
annotations: {
readOnlyHint: false, // server maintains thoughtHistory and branches state
destructiveHint: false, // accurate — no external side effects
idempotentHint: false, // repeated calls produce different history lengths
openWorldHint: false, // accurate — operates on internal reasoning state
},
Impact
Clients relying on readOnlyHint: true for safety assumptions (e.g., "safe to call in parallel", "no state side effects to roll back") will miss the session-state accumulation. Clients relying on idempotentHint: true for caching/retry (e.g., "safe to retry without checking result") will misbehave — a retried call produces a different history length and may create a duplicate branch entry.
Source confirmed on main
src/sequentialthinking/index.ts lines 201-209 (current main as of 2026-08-30):
annotations: {
readOnlyHint: true, // ← should be false
destructiveHint: false,
idempotentHint: true, // ← should be false
openWorldHint: false,
},
src/sequentialthinking/lib.ts lines 23-26, 101, 111-112 confirm the stateful behavior.
Context
- BETS receipt:
agents/_state/bets/20260830T092705Z_sequential-thinking.json(HUMMBL internal, available on request) - Related: #3403 (added these annotations without verification — the suggestion was accepted as-is)
- Discovered during a governed BETS cycle on the MCP fleet, not via automated scanner
Happy to open a PR if that's preferred.
- 主要言語
- JavaScript
- スター
- 91.2k
- フォーク
- 11.8k
- 平均マージ
- 6時間 20分
- マージ済み PR(30日)
- 117
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
modelcontextprotocol/servers のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
modelcontextprotocol/servers#5156 ·
メンテナーはふだん 1 日以内に返信
-
memory: create_entities, create_relations and add_observations could declare idempotentHint: true対応中かも @syedmustafan が 1 日前に担当しました。 オープンenhancement v2
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
modelcontextprotocol/servers#5153 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
modelcontextprotocol/servers#5134 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
modelcontextprotocol/servers#5071 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
modelcontextprotocol/servers#5059 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
modelcontextprotocol/servers の issue をすべて見る
似ている issue
-
documentation good first issue theming
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
feature
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
drevendev/PatchPitch#2 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
521xueweihan/HelloGitHub#4025 ·