Commit 3dce44d
committed
feat: Add Pagination for requesting list of prompts
Adds the Pagination feature to the `prompts/list` feature as described in the specification.
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.
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 261554b commit 3dce44d
4 files changed
Lines changed: 688 additions & 19 deletions
File tree
- mcp-spring/mcp-spring-webflux/src/test/java/io/modelcontextprotocol
- mcp/src/main/java/io/modelcontextprotocol
- server
- spec
0 commit comments