fix(mcp): two SDK-default list methods answer cacheScope "public", and logging/setLevel answers without a logging capability
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
What happens
- go-sdk's default handlers for
prompts/listandresources/templates/listanswer{"ttlMs":0,"cacheScope":"public", ...: []}. The cache-control middleware ininternal/mcp/server.go(:924-946, where it setslistRes.CacheScope = "private") and its comments say that every codegraph response iscacheScope: "private". logging/setLevelanswers{}, butinitializeadvertises nologgingcapability.
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/setLevelanswers method-not-found, orinitializeadvertises theloggingcapability.
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/listandlogging/setLevelis decided, and a wire-oracle scenario pins it. - The middleware comments match the behavior.
- The fix PR adds the requirement to the
mcp-serverspec through a delta.
🤖 Generated with Claude Code
- 主要语言
- Go
- 星标
- 0
- 派生
- 0
- 平均合并
- 7 小时 42 分钟
- 30 天内合并 PR
- 111
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
seanb4t/codegraph-go 的其他 Issue
-
chore needs-triage
难度 1/5 1 小时以内 新手友好度 88/100
seanb4t/codegraph-go#380 ·
维护者通常 1 天内回复
-
chore needs-triage
难度 2/5 1-3 小时 新手友好度 82/100
seanb4t/codegraph-go#379 ·
维护者通常 1 天内回复
-
area:query chore needs-triage spec-needed
难度 2/5 1-3 小时 新手友好度 74/100
seanb4t/codegraph-go#377 ·
维护者通常 1 天内回复
-
chore needs-triage
难度 1/5 1-3 小时 新手友好度 84/100
seanb4t/codegraph-go#362 ·
维护者通常 1 天内回复
-
area:query bug needs-triage
难度 2/5 1-3 小时 新手友好度 80/100
seanb4t/codegraph-go#355 ·
维护者通常 1 天内回复
查看 seanb4t/codegraph-go 的全部 Issue
相似的 Issue
-
go-vulnerability security-scan
难度 1/5 1 小时以内 新手友好度 84/100
teslashibe/agent-go#35 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
alecthomas/chroma#1498 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 8 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复