Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Return merged cache hints from list_all_* client methods

Aberta
#1,411 1 comentário 0 reações 1 responsável Ver no GitHub

Mantenedores costumam responder em até 3 dias

@gocamille já está trabalhando nisso.

Desde 29/10/2026.

Avaliação

Esta issue ainda não foi avaliada.

Descrição

enhancement P2 ready for work T-service

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 https://github.com/modelcontextprotocol/rust-sdk/pull/1392#discussion_r4416288583.

Linguagem predominante
Rust
Estrelas
4.1k
Forks
680
Merge médio
3d 19h
PRs com merge (30d)
40

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de modelcontextprotocol/rust-sdk

Todas as issues de modelcontextprotocol/rust-sdk

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.