File tree Expand file tree Collapse file tree 2 files changed +44
-2
lines changed Expand file tree Collapse file tree 2 files changed +44
-2
lines changed Original file line number Diff line number Diff line change 3535
3636### Pagination
3737
38- <!-- TODO -->
38+ Server-side feature lists may be
39+ [ paginated] ( https://modelcontextprotocol.io/specification/2025-06-18/server/utilities/pagination ) ,
40+ using cursors. The SDK supports this by default.
41+
42+ ** Client-side** : The ` ClientSession ` provides methods returning
43+ [ iterators] ( https://go.dev/blog/range-functions ) for each feature type.
44+ These iterators are an ` iter.Seq2[Feature, error] ` , where the error value
45+ indicates whether page retrieval failed.
46+
47+ - [ ` ClientSession.Prompts ` ] ( https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ClientSession.Prompts )
48+ iterates prompts.
49+ - [ ` ClientSession.Resource ` ] ( https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ClientSession.Resource )
50+ iterates resources.
51+ - [ ` ClientSession.ResourceTemplates ` ] ( https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ClientSession.ResourceTemplates )
52+ iterates resource templates.
53+ - [ ` ClientSession.Tools ` ] ( https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ClientSession.Tools )
54+ iterates tools.
55+
56+ ** Server-side** : pagination is on by default, so in general nothing is required
57+ server-side. However, you may use
58+ [ ` ServerOptions.PageSize ` ] ( https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ServerOptions.PageSize )
59+ to customize the page size.
Original file line number Diff line number Diff line change 2828
2929### Pagination
3030
31- <!-- TODO -->
31+ Server-side feature lists may be
32+ [ paginated] ( https://modelcontextprotocol.io/specification/2025-06-18/server/utilities/pagination ) ,
33+ using cursors. The SDK supports this by default.
34+
35+ ** Client-side** : The ` ClientSession ` provides methods returning
36+ [ iterators] ( https://go.dev/blog/range-functions ) for each feature type.
37+ These iterators are an ` iter.Seq2[Feature, error] ` , where the error value
38+ indicates whether page retrieval failed.
39+
40+ - [ ` ClientSession.Prompts ` ] ( https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ClientSession.Prompts )
41+ iterates prompts.
42+ - [ ` ClientSession.Resource ` ] ( https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ClientSession.Resource )
43+ iterates resources.
44+ - [ ` ClientSession.ResourceTemplates ` ] ( https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ClientSession.ResourceTemplates )
45+ iterates resource templates.
46+ - [ ` ClientSession.Tools ` ] ( https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ClientSession.Tools )
47+ iterates tools.
48+
49+ ** Server-side** : pagination is on by default, so in general nothing is required
50+ server-side. However, you may use
51+ [ ` ServerOptions.PageSize ` ] ( https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ServerOptions.PageSize )
52+ to customize the page size.
You can’t perform that action at this time.
0 commit comments