[v2] Simple pagination README client fails before fetching the second tools page

オープン 初心者向け
#3,978 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

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

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
86/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
documentation

調査の方向性

リンク先の例にある examples/servers/simple-pagination/README.md を開き、そのページネーションコードを報告された動作する修正と比較してください。まず、結果のカーソルフィールドと list_tools に渡されるパラメーターを確認してください。付属の stdio サーバーで実行でき、期待される2ページ分のツール、リソース、プロンプトを出力するように例を更新してください。

索引モデルが issue の本文から書いたものです。

説明

v2
What happened?

I ran the README example against the bundled stdio server with mcp 2.3.0. It printed First page: 5 tools and exited with AttributeError: 'ListToolsResult' object has no attribute 'nextCursor'.

The example needs to read next_cursor and pass it to ClientSession.list_tools(params=PaginatedRequestParams(cursor=cursor)). I reran the corrected example. It printed cursor 5, five tools on the second page, ten resources, and seven prompts, and exited successfully.

Codex helped diagnose the issue, wrote the local correction, and drafted this report. I ran both versions and checked the output.

What did you expect?

Running the example against the bundled stdio server should print five tools on the first page, cursor 5, five tools on the second page, ten resources, and seven prompts.

Code to reproduce
https://github.com/modelcontextprotocol/python-sdk/blob/77001c96f9507be0f4d009b83210a384a5e08bda/examples/servers/simple-pagination/README.md#example
SDK version

mcp 2.3.0, Python 3.14.4. Also reproduced on main at 77001c96.

Area

Documentation

主要言語
Python
スター
25k
フォーク
4.2k
平均マージ
10分
マージ済み PR(30日)
1

環境構築

はじめの一歩

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

modelcontextprotocol/python-sdk のほかの issue

modelcontextprotocol/python-sdk の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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