Describe the bug
The PaginatedRequest model has the cursor parameter in the wrong place: request.cursor instead of request.params.cursor as defined by the pagination spec.
Since the methods updated in #718 pass the cursor parameter down to the PaginatedRequest model, they are also affected by this bug.
To Reproduce
from mcp import types
list_tools_request = types.ListToolsRequest(
method="tools/list",
cursor="123",
)
client_request = types.ClientRequest(list_tools_request)
# Dump to JSON
client_request_json = client_request.model_dump_json()
print(client_request_json)
❯ python test.py
{"method":"tools/list","params":null,"cursor":"123"}
Expected behavior
A request that conforms to the pagination spec:
{"method":"tools/list","params":{"cursor":"123"}}
Describe the bug
The
PaginatedRequestmodel has thecursorparameter in the wrong place:request.cursorinstead ofrequest.params.cursoras defined by the pagination spec.Since the methods updated in #718 pass the
cursorparameter down to thePaginatedRequestmodel, they are also affected by this bug.To Reproduce
Expected behavior
A request that conforms to the pagination spec: