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

Đang mở
#131 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
api

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Go
Star
0
Fork
0
Merge trung bình
7 giờ 42 phút
Pull request đã merge (30 ngày)
111

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của seanb4t/codegraph-go

Tất cả issue của seanb4t/codegraph-go

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.