Description
list_resources returns all tracked documents in a single response with no pagination. For large workspaces with many open files, this can produce a response exceeding MCP transport buffer limits (especially over stdio).
The _request: Option<PaginatedRequestParams> parameter is already accepted but ignored.
Expected Behavior
When max_documents (or a configurable page size) is exceeded, list_resources should return a cursor-based paginated response using the next_cursor field of ListResourcesResult.
Actual Behavior
All resources are returned in one shot regardless of count. No cursor is ever set.
Environment
- Version: 0.3.6
- Marked in source as
TODO(critic-S5) in crates/mcpls-core/src/mcp/server.rs:551
Logs / Evidence
// TODO(critic-S5): paginate when max_documents == 0 (unlimited mode can produce
// very large single-page responses that may exceed transport buffers).
Notes
The PaginatedRequestParams from rmcp already carries a cursor field — implementation would use it to slice open_paths() output and emit next_cursor when more pages remain.
Description
list_resourcesreturns all tracked documents in a single response with no pagination. For large workspaces with many open files, this can produce a response exceeding MCP transport buffer limits (especially over stdio).The
_request: Option<PaginatedRequestParams>parameter is already accepted but ignored.Expected Behavior
When
max_documents(or a configurable page size) is exceeded,list_resourcesshould return a cursor-based paginated response using thenext_cursorfield ofListResourcesResult.Actual Behavior
All resources are returned in one shot regardless of count. No cursor is ever set.
Environment
TODO(critic-S5)incrates/mcpls-core/src/mcp/server.rs:551Logs / Evidence
Notes
The
PaginatedRequestParamsfromrmcpalready carries acursorfield — implementation would use it to sliceopen_paths()output and emitnext_cursorwhen more pages remain.