Skip to content

Surface SEP-2549 caching hints (ttlMs/cacheScope) on the auto-paginating list overloads #1645

Description

@tarekgh

Following up on PR #1623 (SEP-2549 caching hints).

The auto-paginating client overloads (ListToolsAsync(RequestOptions?, CancellationToken), ListPromptsAsync, ListResourcesAsync, ListResourceTemplatesAsync) aggregate every page into a single IList<...> and therefore drop the per-result ttlMs / cacheScope hints introduced by SEP-2549. Today those hints are only reachable via the raw single-page overloads (e.g. ListToolsAsync(ListToolsRequestParams, CancellationToken)), which PR #1623 documents with a <remarks> note.

We should decide how (and whether) to surface the caching hints from the convenience overloads. This needs an API-design decision because:

  • Each page carries its own ttlMs/cacheScope, so there is no single obviously-correct value to expose for an aggregated list (first page? minimum TTL? a per-page collection?).
  • The overloads currently return IList<...>. Exposing hints would require either changing the return type (breaking), adding out parameters, or introducing a new result wrapper / additional overload.

Scope: applies to all four list overloads. ReadResourceAsync is unaffected since it is not paginated.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions