Feature Request: session-scoped tool inventory API (list MCP-discovered tools loaded into a session)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- csharp, go, python, typescript
- Lĩnh vực
- api, backend-api-design, developer-experience
Hướng nghiên cứu
Bắt đầu bằng cách đọc phần triển khai createSessionRpc và các wrapper session.rpc.{mcp,skills,plugins,extensions}.list() hiện có. Kiểm tra CONTRIBUTING để biết các yêu cầu về tính tương đương giữa Python, Go và .NET, đồng thời xem lại api.schema.json dù trình xử lý RPC phía máy chủ nằm ngoài repository này. Công việc được xem là hoàn tất khi các binding SDK được hỗ trợ cung cấp kết quả tools.list nhất quán trong phạm vi session, với điều kiện RPC nội bộ trở nên khả dụng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
No public API enumerates the tools loaded into a session — built-ins merged with MCP-discovered tools from SessionConfig.mcpServers. Closest existing surfaces don't cover it:
client.rpc.tools.list({ model? })is server-scoped — built-ins only, no session-loaded MCP tools.session.rpc.mcp.list()returns server connection status (name,status,error?,source?), not tools or counts per server.session.mcp_servers_loadedevent fires once on session startup but carries the same server-status-only payload — no tool list.session.mcp_server_status_changedcarries{ serverName, status }only.session.tools_updatedevent payload is just{ model: string }.
A session can report mcp.status: "connected" and still expose zero tools (wrong CLI flags, version mismatch, schema error) — there's no SDK-side way to detect this.
Why it's needed
- Operational visibility. Confirm before the first turn that an MCP server actually contributed the expected tools, not just that its process started.
- Diagnostic UIs. Surface per-server tool counts to operators of BYOK / multi-MCP deployments.
- Test assertions. Verify a given MCP wiring exposes the expected tool set without spawning a parallel
tools/listprobe. - Parity with prior MCP clients. Other MCP integrations (e.g.
@ai-sdk/mcp) expose discovered tools as an enumerable map; consumers migrating to copilot-sdk lose this.
Contribution scope
api.schema.json ships from the closed @github/copilot npm package (the public github/copilot-cli repo is just the installer). The server-side RPC handler must live in the internal CLI — external contributors can only touch SDK bindings/wrappers in this repo, not the underlying RPC implementation.
Proposed solution
Add a session-scoped tools.list RPC, mirroring the existing client.rpc.tools.list() but reflecting per-session config:
// in createSessionRpc:
tools: {
list: async (): Promise<SessionToolsListResult> =>
connection.sendRequest("session.tools.list", { sessionId }),
handlePendingToolCall: /* unchanged */,
}
export interface SessionToolsListResult {
tools: Tool[]; // namespacedName populated for MCP tools (e.g. "playwright/browser_navigate")
}
Returns built-ins (post-excludedTools/availableTools filtering) + MCP-contributed tools. Consistent with existing session.rpc.{mcp,skills,plugins,extensions}.list() shape. Parity in Python/Go/.NET per CONTRIBUTING.
A leaner alternative: enrich McpServer with toolCount?: number and/or tools?: string[]. Less consistent with the existing pattern but lighter.
Related
- #944 — same underlying gap, surfaced as a question.
- #735 — adjacent (manipulating session tool set without teardown).
Environment
@github/copilot-sdk@0.3.0
- Ngôn ngữ chính
- Java
- Star
- 10.5k
- Fork
- 1.5k
- Merge trung bình
- 1 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 130
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/copilot-sdk
-
agentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
github/copilot-sdk#2760 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
github/copilot-sdk#2759 ·
-
documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
github/copilot-sdk#2758 ·
-
agentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
github/copilot-sdk#2709 · 1 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
github/copilot-sdk#2673 ·
Tất cả issue của github/copilot-sdk
Issue tương tự
-
certification
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's Đang mởbug ecr
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Needs: Triage Type: Feature request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
AntennaPod/AntennaPod#8794 ·
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100