MCP tools/list fetched as a single page — tools beyond the first page are silently dropped
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- typescript
- 領域
- api
調査の方向性
packages/opencode/src/mcp/index.ts から始め、標準の client.listTools() パスと listToolsLenient() のリクエストパスの両方を調査し、nextCursor の処理に注意してください。各ページのツールが収集され、登録済みツールセットとキャッシュに保持されることを検証する、複数ページの tools/list テストを追加してください。
索引モデルが issue の本文から書いたものです。
説明
Summary
The MCP client retrieves a server's tool list with a single tools/list request and never follows the nextCursor pagination marker. Any server that paginates its tool catalog will have every tool past the first page silently omitted — no error, no warning.
Details
Two code paths are affected, both in packages/opencode/src/mcp/index.ts:
- Standard path —
client.listTools(). In@modelcontextprotocol/sdk@1.26.0this issues a single request and does not loop over pagination:async listTools(params, options) { const result = await this.request({ method: 'tools/list', params }, ListToolsResultSchema, options); ... } - Lenient fallback —
listToolsLenient()callsclient.request({ method: "tools/list", params: {} }, ...), a single request that ignoresnextCursoreven thoughLenientListToolsResultSchemamodels that field.
Because neither path advances the cursor, tools beyond the first page are dropped from the registered tool set and from the tool-list cache.
Impact
Minor→Medium. Only affects servers whose tool catalog is large enough to paginate; most servers return all tools in one page. When it does occur, the failure is silent — affected tools simply never appear.
Suggested fix
- Loop on
nextCursor, concatenatingtools, in both the standard and lenient paths before returning/caching. - Add a test with a multi-page
tools/listresponse to verify all pages are collected.
- 主要言語
- TypeScript
- スター
- 813
- フォーク
- 134
- 平均マージ
- 2日 3時間
- マージ済み PR(30日)
- 65
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
AltimateAI/altimate-code のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
AltimateAI/altimate-code#1359 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
AltimateAI/altimate-code#1323 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
AltimateAI/altimate-code#1288 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
AltimateAI/altimate-code#1285 ·
-
privacy: Altimate Base consent dialog no longer discloses persistent per-installation identifier オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
AltimateAI/altimate-code#1284 ·
AltimateAI/altimate-code の issue をすべて見る
似ている issue
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
Crush オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
ElementsProject/cln-application#167 · コメント 1 件 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Quantco/pnpm-licenses#17 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100