You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(mcp): follow nextCursor in prompts/list, resources/list and resources/templates/list #855
#825 (fixing #301) made Raven follow nextCursor for tools/list. The other three list operations the MCP spec makes paginated are still fetched as a single page:
Verb
Call site
Model-facing tool
resources/list
raven/mcp/resources.py:130
list_mcp_resources
resources/templates/list
raven/mcp/resources.py:189
list_mcp_resource_templates
prompts/list
raven/mcp/prompts.py:115
list_mcp_prompts
Each site calls session.list_*() once and renders the items without looking at nextCursor. The Python SDK does not walk pages for the caller: in the pinned mcp 1.30.0, every ClientSession.list_* method sends exactly one request.
When a server paginates any of these lists, the model sees only the first page, and nothing tells it the list is incomplete. This is the same silent truncation as #301, on the remaining three verbs.
Python SDK, mcp/client/session.py: list_resources, list_resource_templates and list_prompts each build one request and return its result; there is no loop.
read_mcp_resource (by URI) and get_mcp_prompt (by name) still work for an item the model already knows; only discovery through the three list tools is truncated.
No user report yet, and we have not found a public server that paginates these lists today.
The gap is still deterministic: any server that pages one of these lists triggers it, and resource lists (files, documents, table rows) are where large counts are most plausible.
Proposed fix
One shared helper in raven/mcp/ that walks a list verb page by page with params=PaginatedRequestParams(cursor=...) and stops on an empty or repeated cursor (the stop rule fix(mcp): page through tools/list nextCursor #825 introduced).
Problem
#825 (fixing #301) made Raven follow
nextCursorfortools/list. The other three list operations the MCP spec makes paginated are still fetched as a single page:resources/listraven/mcp/resources.py:130list_mcp_resourcesresources/templates/listraven/mcp/resources.py:189list_mcp_resource_templatesprompts/listraven/mcp/prompts.py:115list_mcp_promptsEach site calls
session.list_*()once and renders the items without looking atnextCursor. The Python SDK does not walk pages for the caller: in the pinned mcp 1.30.0, everyClientSession.list_*method sends exactly one request.When a server paginates any of these lists, the model sees only the first page, and nothing tells it the list is incomplete. This is the same silent truncation as #301, on the remaining three verbs.
Evidence
resources/list,resources/templates/list,prompts/list,tools/list." https://modelcontextprotocol.io/specification/2026-07-28/server/utilities/paginationlistTools(),listPrompts(),listResources()andlistResourceTemplates()follownextCursorand return one aggregated list. https://github.com/modelcontextprotocol/typescript-sdk/blob/main/docs/clients/calling.mdmcp/client/session.py:list_resources,list_resource_templatesandlist_promptseach build one request and return its result; there is no loop.Impact
Lower than #301:
read_mcp_resource(by URI) andget_mcp_prompt(by name) still work for an item the model already knows; only discovery through the three list tools is truncated.The gap is still deterministic: any server that pages one of these lists triggers it, and resource lists (files, documents, table rows) are where large counts are most plausible.
Proposed fix
raven/mcp/that walks a list verb page by page withparams=PaginatedRequestParams(cursor=...)and stops on an empty or repeated cursor (the stop rule fix(mcp): page through tools/list nextCursor #825 introduced).tools/listloop from fix(mcp): page through tools/list nextCursor #825 onto it, so all four verbs share one implementation.Acceptance criteria
tests/test_mcp_prompts.pyandtests/test_mcp_resources.pyfail on currentmainand pass with the fix.make lint-typesstays clean (no deprecatedcursor=overload).Related: #301, #825