Topic 3: Protocol utilities
Utilities are small, optional mechanisms built from requests and notifications. We do pagination first, because it needs a different kind of server, then use one script for the rest.
Pagination
Pagination splits a long list response into pages. The server returns a page plus a nextCursor; the client sends that cursor back to get the next page, and stops when no nextCursor comes back. The cursor is an opaque string: the client must never parse or build one, and the server alone decides the page size. tools/list, resources/list, resources/templates/list, and prompts/list support it.
MCPServer returns everything in one page, which is right for a folder of eight notes. To page, you write the list handler on the low-level Server. Here is a paged listing of the notes, three per page.