Title: Cursors are not sent to the server correctly · Issue #735 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: Cursors are not sent to the server correctly · Issue #735 · modelcontextprotocol/python-sdk
X Title: Cursors are not sent to the server correctly · Issue #735 · modelcontextprotocol/python-sdk
Description: Describe the bug The PaginatedRequest model has the cursor parameter in the wrong place: request.cursor instead of request.params.cursor as defined by the pagination spec. Since the methods updated in #718 pass the cursor parameter down ...
Open Graph Description: Describe the bug The PaginatedRequest model has the cursor parameter in the wrong place: request.cursor instead of request.params.cursor as defined by the pagination spec. Since the methods updated...
X Description: Describe the bug The PaginatedRequest model has the cursor parameter in the wrong place: request.cursor instead of request.params.cursor as defined by the pagination spec. Since the methods updated...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/issues/735
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cursors are not sent to the server correctly","articleBody":"**Describe the bug**\nThe `PaginatedRequest` model has the `cursor` parameter in the wrong place: `request.cursor` instead of `request.params.cursor` as defined by the [pagination spec](https://modelcontextprotocol.io/specification/2025-03-26/server/utilities/pagination#request-format). \n\nSince the methods updated in https://github.com/modelcontextprotocol/python-sdk/pull/718 pass the `cursor` parameter down to the `PaginatedRequest` model, they are also affected by this bug.\n\n**To Reproduce**\n```py\nfrom mcp import types\n\nlist_tools_request = types.ListToolsRequest(\n method=\"tools/list\",\n cursor=\"123\",\n)\n\nclient_request = types.ClientRequest(list_tools_request)\n\n# Dump to JSON\nclient_request_json = client_request.model_dump_json()\nprint(client_request_json)\n```\n```\n❯ python test.py\n{\"method\":\"tools/list\",\"params\":null,\"cursor\":\"123\"}\n```\n\n**Expected behavior**\nA request that conforms to the [pagination spec](https://modelcontextprotocol.io/specification/2025-03-26/server/utilities/pagination#request-format):\n```\n{\"method\":\"tools/list\",\"params\":{\"cursor\":\"123\"}}\n```\n\n","author":{"url":"https://github.com/nbarbettini","@type":"Person","name":"nbarbettini"},"datePublished":"2025-05-16T13:46:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/735/python-sdk/issues/735"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d3765cff-b073-8b7d-7b48-b92bca527dad |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ACDC:257A7:137E108:1C976C9:6A60A715 |
| html-safe-nonce | b4af21c27b420a8412dba97d95cf1449ecacf9d0d61f30478d7a26a2630d3040 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQ0RDOjI1N0E3OjEzN0UxMDg6MUM5NzZDOTo2QTYwQTcxNSIsInZpc2l0b3JfaWQiOiIxNDI0NzA4NjE3NDMwNDExMDI5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 310a16e79b8b1bc3a648331e2d211e1bfd97971bede0bccee056d7d81f00a2bf |
| hovercard-subject-tag | issue:3069061318 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/modelcontextprotocol/python-sdk/735/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7964fb62cd047bb48b762725d0ab1ef5b2858040c4372b691af0b8bc694255ff/modelcontextprotocol/python-sdk/issues/735 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7964fb62cd047bb48b762725d0ab1ef5b2858040c4372b691af0b8bc694255ff/modelcontextprotocol/python-sdk/issues/735 |
| og:image:alt | Describe the bug The PaginatedRequest model has the cursor parameter in the wrong place: request.cursor instead of request.params.cursor as defined by the pagination spec. Since the methods updated... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nbarbettini |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5142d23feb6a650085422edf60d68c93777dfa6c4b0c9151eb464d3e4969f618 |
| turbo-cache-control | no-preview |
| go-import | github.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 862584018 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/python-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 862584018 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/python-sdk |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c55ed501f6bbf0f43900d14552f6a9bd0bec6757 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width