Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

MCP tools/list fetched as a single page — tools beyond the first page are silently dropped

オープン
#986 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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.0 this 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() calls client.request({ method: "tools/list", params: {} }, ...), a single request that ignores nextCursor even though LenientListToolsResultSchema models 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, concatenating tools, in both the standard and lenient paths before returning/caching.
  • Add a test with a multi-page tools/list response to verify all pages are collected.
主要言語
TypeScript
スター
813
フォーク
134
平均マージ
2日 3時間
マージ済み PR(30日)
65

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

AltimateAI/altimate-code のほかの issue

AltimateAI/altimate-code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。