fix(mcp): two SDK-default list methods answer cacheScope "public", and logging/setLevel answers without a logging capability

Aperta
#131 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go
Ambito
api

Direzione di ricerca

Start with the cache-control middleware in internal/mcp/server.go around lines 924-946, where listRes.CacheScope is set to "private", and compare it with the go-sdk default handlers for prompts/list, resources/templates/list and logging/setLevel. First decide the intended behavior; the issue leaves this open. Done means the behavior is pinned by a wire-oracle scenario, the middleware comments match it, and the mcp-server spec has a delta.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area:mcp bug priority:low spec-needed
What happens
  • go-sdk's default handlers for prompts/list and resources/templates/list answer {"ttlMs":0,"cacheScope":"public", ...: []}. The cache-control middleware in internal/mcp/server.go (:924-946, where it sets listRes.CacheScope = "private") and its comments say that every codegraph response is cacheScope: "private".
  • logging/setLevel answers {}, but initialize advertises no logging capability.

No test or wire-oracle transcript pins either behavior. The mcp-server spec leaves both out on purpose.

What you expected instead
  • The two list methods answer private, like the four methods the middleware corrects, or the middleware comments name the methods it covers.
  • logging/setLevel answers method-not-found, or initialize advertises the logging capability.
Evidence

Probed on main on 2026-10-17 with a stdio session: initialize, then each method in turn.

Acceptance criteria
  • The behavior of prompts/list, resources/templates/list and logging/setLevel is decided, and a wire-oracle scenario pins it.
  • The middleware comments match the behavior.
  • The fix PR adds the requirement to the mcp-server spec through a delta.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UNqdnC3q6U362BvyfxuKCF

Lingua principale
Go
Stelle
0
Fork
0
Merge medio
7h 42m
PR unite (30g)
111

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di seanb4t/codegraph-go

Tutte le issue di seanb4t/codegraph-go

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.