Skip to content

Commit 094088d

Browse files
committed
feat: Add Pagination for requests
Adds the Pagination feature as described in the specification for prompts, resources, resource templates and tools. To make this possible mainly two changes are made: 1. The logic for cursor handling is added. 2. Handling for invalid parameters (MCP error code `-32602 (Invalid params)`) is added to the `McpServerSession`. For now the cursor is the base64 encoded start index of the next page and the hash value of the collection at time of computing. The page size is set to 10. When parameters are found to be invalid the newly introduced `McpParamsValidationError` is returned to handle it properly in the `McpServerSession`.
1 parent 0069c97 commit 094088d

File tree

4 files changed

+687
-19
lines changed

4 files changed

+687
-19
lines changed

0 commit comments

Comments
 (0)