Consolidated `method`-dispatch tools return unhelpful "unknown method" errors (don't list supported methods)
还没有人认领这个 Issue。
评估
调研方向
先从 labels.go 开始,比较其方法分派错误,然后检查 pull_request_read、pull_request_review_write、issue_read、sub-issue write、actions、projects 和 ui_get 的处理器。确保未识别的方法会列出受支持的值,并且会将省略的方法输入报告为必填;验证这两种情况下生成的工具错误消息。
由索引模型根据 Issue 内容生成。
描述
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
- Call
pull_request_review_writewith the required method omitted, e.g.{ "owner": "o", "repo": "r", "pullNumber": 42 }. - View the output.
- 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
- 主要语言
- Go
- 星标
- 33.1k
- 派生
- 5k
- 平均合并
- 2 天 1 小时
- 30 天内合并 PR
- 25
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/github-mcp-server 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
github/github-mcp-server#3235 ·
-
enhancement
难度 1/5 1 小时以内 新手友好度 88/100
github/github-mcp-server#3042 · 2 条评论 ·
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
github/github-mcp-server#3032 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 74/100
github/github-mcp-server#2803 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
github/github-mcp-server#2740 ·
查看 github/github-mcp-server 的全部 Issue
相似的 Issue
-
area/dev-productivity area/disaster-recovery area/ipcei kind/enhancement
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 1/5 1 小时以内 新手友好度 85/100
-
难度 2/5 1-3 小时 新手友好度 75/100
-
kind/bug status/0-triage
难度 2/5 1-3 小时 新手友好度 75/100
-
🤔 refinement needed
难度 2/5 1-3 小时 新手友好度 75/100
equinor/radix-operator#1979 ·