Title: No way to return `nextCursor` using list_resources decorator · Issue #759 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: No way to return `nextCursor` using list_resources decorator · Issue #759 · modelcontextprotocol/python-sdk
X Title: No way to return `nextCursor` using list_resources decorator · Issue #759 · modelcontextprotocol/python-sdk
Description: When using the list_resources decorator, there is no way to return the nextCursor if your resources are paginated, as the decorator relies on just a list of Resource being returned Solution: Make a decorator list_paginated_resources that...
Open Graph Description: When using the list_resources decorator, there is no way to return the nextCursor if your resources are paginated, as the decorator relies on just a list of Resource being returned Solution: Make a...
X Description: When using the list_resources decorator, there is no way to return the nextCursor if your resources are paginated, as the decorator relies on just a list of Resource being returned Solution: Make a...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/issues/759
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"No way to return `nextCursor` using list_resources decorator","articleBody":"- When using the [list_resources](https://github.com/modelcontextprotocol/python-sdk/blob/main/src/mcp/server/lowlevel/server.py#L259) decorator, there is no way to return the `nextCursor` if your resources are paginated, as the decorator relies on just a list of `Resource` being returned\n- Solution: Make a decorator `list_paginated_resources` that returns a dict with 'resources' and 'nextCursor' or even just the `ListResourceResult` object itself\n\nLet me know your thoughts on the above and I'm happy to raise a PR with it \n","author":{"url":"https://github.com/rbehal","@type":"Person","name":"rbehal"},"datePublished":"2025-05-20T01:01:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/759/python-sdk/issues/759"}
| 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:b23199b9-8375-759b-6627-9f3a62d8224e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D8FA:21ABD1:24D18CB:32959D4:6A60A6E2 |
| html-safe-nonce | b4e9f55a92bbf2ebb290026924dd06be848597a07c6d7b87665890ed31e2e07f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOEZBOjIxQUJEMToyNEQxOENCOjMyOTU5RDQ6NkE2MEE2RTIiLCJ2aXNpdG9yX2lkIjoiNTkyODgyNTU3NzkwNjY3NzQ3NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 25d24169fa98d169d0b37fcd4c1e4292039bfdf65d06d851fa6d6ed4bdf2beb0 |
| hovercard-subject-tag | issue:3075326981 |
| 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/759/issue_layout |
| twitter:image | https://opengraph.githubassets.com/93b40c76bed32719e961a21e3f4b7fa7fe57cffa402aebcf9df113c101bee7a5/modelcontextprotocol/python-sdk/issues/759 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/93b40c76bed32719e961a21e3f4b7fa7fe57cffa402aebcf9df113c101bee7a5/modelcontextprotocol/python-sdk/issues/759 |
| og:image:alt | When using the list_resources decorator, there is no way to return the nextCursor if your resources are paginated, as the decorator relies on just a list of Resource being returned Solution: Make a... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rbehal |
| 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