Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Consolidated `method`-dispatch tools return unhelpful "unknown method" errors (don't list supported methods)

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

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

Đánh giá

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

Hướng nghiên cứu

Bắt đầu với labels.go để so sánh lỗi điều phối phương thức của nó, sau đó kiểm tra các handler cho pull_request_read, pull_request_review_write, issue_read, sub-issue write, actions, projects và ui_get. Đảm bảo rằng các phương thức không được nhận dạng liệt kê các giá trị được hỗ trợ và rằng đầu vào phương thức bị bỏ qua được báo cáo là bắt buộc; xác minh các thông báo lỗi công cụ tạo ra cho cả hai trường hợp.

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

Mô tả

bug request ai review
Describe the bug

The consolidated tools that dispatch on a method argument return a bare unknown method: when the method is unrecognized, without listing the valid methods. labels.go already does the helpful thing ("... Supported methods are: create, update, delete"); the other method-dispatch tools don't, so the behavior is inconsistent.

Separately, pull_request_review_write decodes arguments with mapstructure.WeakDecode (it does not use RequiredParam like the other tools), so omitting the required method produces "unknown method: " with an empty value — instead of telling the caller that method is required.

Affected tools: pull_request_read, pull_request_review_write, issue_read, sub-issue write, actions (list/get/run), projects (list/get/write), ui_get.

Affected version

Version: v1.3.0
Commit: 34227037fc48771baea9af7163e28cb6556ef287
Build Date: 2026-06-11T14:16:55Z

Steps to reproduce the behavior
  1. Call pull_request_review_write with the required method omitted, e.g. { "owner": "o", "repo": "r", "pullNumber": 42 }.
  2. View the output.
  3. Server returns (tool-result error, HTTP 200 isError):

unknown method:
(empty after the colon — method was never supplied, but the error doesn't say it's required or what the valid values are).

Or, with an unrecognized value { "method": "bogus", ... }:

unknown method: bogus
No list of supported methods. The same bare error occurs on pull_request_read, issue_read, actions_, projects_, and ui_get for any unrecognized method.

Expected vs actual behavior

Expected: the error names the supported methods (matching labels.go, e.g. unknown method: bogus. Supported methods are: create, submit_pending, delete_pending, resolve_thread, unresolve_thread), and an omitted required method reports method is required. Supported methods are: ....

Actual: a bare unknown method: with no guidance; for pull_request_review_write an omitted method yields unknown method: (empty), which reads like a routing bug rather than a missing required argument.

Logs
Tool-result error text returned by the server:

unknown method:
unknown method: bogus

Ngôn ngữ chính
Go
Star
33.1k
Fork
5k
Merge trung bình
2 ngày 1 giờ
Pull request đã merge (30 ngày)
25

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.

Issue khác của github/github-mcp-server

Tất cả issue của github/github-mcp-server

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.