Skip to content

Return merged cache hints from list_all_* client methods #1411

Open

Description

@DaleSeo

The Peer::list_all_* methods (tools, prompts, resources, resource templates, skills) follow the cursor across pages and return only the items. On 2026-07-28 each page carries ttlMs and cacheScope, and the merged list drops them, so a client that uses list_all_* cannot cache the result correctly.

Proposal: also expose a cache hint for the merged list.

  • ttlMs: the earliest expiry across pages. Each page's hint is relative to when that page arrived, so take the minimum of requestTime + ttlMs and convert it back to a TTL relative to the end of the walk.
  • cacheScope: public only if every page is public, otherwise private.
  • A page without hints (legacy peers, or a server that omits them) makes the merged hint absent.

Changing the return type of the existing methods would be a breaking change, so this would add new API next to them, for example a ListAll<T> { items, ttl_ms, cache_scope } returned by new methods, or a single generic helper.

Suggested by @tsarlandie-oai in #1392 (comment).

Activity

  1. added
    P2Medium: important but non-blocking improvement
    ready for workIssue is well-defined and ready to be picked up
    on Oct 29, 2026
  2. github-actions commented on Oct 29, 2026

    @github-actions
    Contributor

    @gocamille is on triage rotation this week and is the reviewer for this one.

    Codex labeled this enhancement / P2 (T-service). Please confirm or correct those labels.

    Automated triage. Labels are a first pass and the assigned maintainer has the final say.

  3. assigned and unassigned on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Medium: important but non-blocking improvementT-serviceService layer changesenhancementNew feature or requestready for workIssue is well-defined and ready to be picked up

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions