github / github/copilot-cli

Repeated MCP discovery reports "Found 0 tools" for an already-loaded namespace

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

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

area:mcp area:tools
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

Summary

Repeated model-side MCP tool discovery reports "Found 0 tools" for a namespace whose tool definitions were already loaded. This misleading result caused the agent to declare a working integration unavailable and skip a required workflow step.

Environment

  • Copilot CLI 1.0.84-2
  • Windows
  • Local stdio MCP server exposing four tools

Reproduction

  1. In a fresh session, discover the configured MCP namespace. In this case, the call was api_tool.list_resources({"paths":["pr-copilot"]}).
  2. Observe "Found 4 tools" and all four tool definitions being loaded.
  3. Repeat the identical discovery call without changing MCP configuration.
  4. Observe "Found 0 tools", despite the previously loaded definitions remaining in context.

This was reproduced in a separate session after investigating the original failure.

Actual behavior and impact

The affected session already had all four schemas in its request history. Two later discovery responses completed with tools: []. The agent then reported: "The PR-monitor integration currently exposes no tools, so I can't start it."

The empty responses were real; the incorrect inference was that no tools were available. This report concerns model-side discovery, not a claim that the MCP server's raw tools/list returned an empty list. No stateful monitor invocation was needed to reproduce the discovery behavior.

Expected behavior

A repeated lookup should either return the existing tool definitions or explicitly report that the tools are already loaded, including their names/count. "No additional definitions to load" must be distinguishable from "no matching or available tools", so the agent does not abandon an available integration.


🤖 m-nash-copilot

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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.

Hướng nghiên cứu

Bắt đầu bằng cách theo dõi cách phía model xử lý các lệnh gọi lặp lại đến api_tool.list_resources cho một namespace MCP, so sánh phản hồi đầu tiên với các phản hồi sau đó. Hoàn thành khi quá trình discovery lặp lại phân biệt rõ các tool đã được tải với trường hợp không có tool nào khả dụng hoặc khớp, đồng thời bao gồm các tên hiện có hoặc số lượng.

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

Đánh giá

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

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.