fix: refine highlighted tool parameter descriptions#2588
Open
RossTarrant wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves agent-facing JSON schema guidance across existing GitHub MCP tools by refining parameter descriptions and adding a couple of low-risk schema constraints (enums), then regenerating tool snapshots and generated docs to match.
Changes:
- Clarified ambiguous parameter descriptions (e.g., Markdown-supported bodies, branch/ref formats, repository-relative paths, GitHub search query syntax).
- Tightened a small number of schemas with explicit enums (notably
search_code.sortandsub_issue_write.method) to prevent incorrect inputs. - Regenerated
pkg/github/__toolsnaps__/*snapshots and updated generated documentation (README + docs).
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates generated tool docs to reflect refined parameter descriptions. |
| pkg/github/actions.go | Clarifies Actions tool parameter guidance (e.g., branch name vs full ref). |
| pkg/github/code_scanning.go | Clarifies ref filter format with concrete examples. |
| pkg/github/copilot.go | Clarifies base_ref expectations for the Copilot assignment tool. |
| pkg/github/discussions.go | Clarifies discussion comment body supports Markdown and when it’s required. |
| pkg/github/gists.go | Clarifies gist file content is raw content. |
| pkg/github/issues.go | Clarifies issue/comment body Markdown support; constrains sub_issue_write.method via enum; adds item-level descriptions for arrays. |
| pkg/github/issues_granular.go | Clarifies issue body parameter semantics (Markdown supported). |
| pkg/github/projects.go | Adds item-level descriptions for project fields array elements. |
| pkg/github/pullrequests.go | Clarifies PR body Markdown support and branch formats; adds item-level description for reviewers. |
| pkg/github/pullrequests_granular.go | Adds item-level description for reviewers; clarifies review/comment bodies support Markdown. |
| pkg/github/repositories.go | Clarifies repository file path semantics and raw content expectations across repo file tools. |
| pkg/github/search.go | Clarifies search_code.sort usage and constrains it to indexed via enum. |
| pkg/github/toolsnaps/actions_list.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/actions_run_trigger.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/add_comment_to_pending_review.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/add_issue_comment.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/add_pull_request_review_comment.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/add_reply_to_pull_request_comment.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/assign_copilot_to_issue.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/create_branch.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/create_gist.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/create_issue.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/create_or_update_file.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/create_pull_request.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/create_pull_request_review.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/delete_file.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/discussion_comment_write.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/get_file_contents.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/issue_write.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/issue_write_ff_remote_mcp_issue_fields.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/list_code_scanning_alerts.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/list_issues_ff_remote_mcp_issue_fields.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/list_pull_requests.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/projects_get.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/projects_list.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/push_files.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/request_pull_request_reviewers.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/search_code.snap | Snapshot update reflecting sort enum constraint and updated description. |
| pkg/github/toolsnaps/search_issues.snap | Snapshot update reflecting updated query description. |
| pkg/github/toolsnaps/search_pull_requests.snap | Snapshot update reflecting updated query description. |
| pkg/github/toolsnaps/sub_issue_write.snap | Snapshot update reflecting method enum constraint. |
| pkg/github/toolsnaps/submit_pending_pull_request_review.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/update_gist.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/update_issue_body.snap | Snapshot update reflecting updated parameter descriptions. |
| pkg/github/toolsnaps/update_pull_request.snap | Snapshot update reflecting updated parameter descriptions (including item-level reviewers description). |
| docs/feature-flags.md | Regenerated docs reflecting updated tool parameter descriptions. |
| docs/insiders-features.md | Regenerated docs reflecting updated tool parameter descriptions. |
Copilot's findings
- Files reviewed: 48/48 changed files
- Comments generated: 0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Clarifies agent-facing parameter descriptions across existing GitHub MCP tools and tightens a few schemas with concise enums/examples where they prevent incorrect usage.
Why
Schema linting in #2425 found missing or insufficient parameter descriptions across many tools, causing agents to guess formats for values like Markdown bodies, search queries, branch refs, and file paths. This improves schema guidance while keeping descriptions short to avoid unnecessary token usage.
Fixes #2425
Why some highlighted params were not updated
Some highlighted parameters were intentionally left unchanged after review. The goal was not to describe every string parameter exhaustively, but to add guidance where agents were likely to misuse a value.
Parameters were left as-is when the existing name and description already gave enough context, such as common GitHub identifiers (
owner,repo,issue_number,pullNumber) or standard pagination/sorting fields. Others were unchanged where extra wording would mostly repeat the parameter name without reducing ambiguity, increasing schema token usage without improving tool use.Search and filter parameters were only expanded when the accepted syntax or format was easy to misuse. For example, GitHub search
queryfields were clarified because agents need to know they accept GitHub search syntax, while simple filters with enums or obvious values did not need additional text.In short, unchanged highlighted params were reviewed and judged either self-explanatory, already constrained by enum/type, or not worth the token cost of extra description.
What changed
search_code.sortandsub_issue_write.methodenums.user:branchforlist_pull_requests.head, repository-relative file paths, and full Git refs for code scanning filters.MCP impact
No tool or API changes
Tool schema or behavior changed
Existing tool schemas changed through parameter descriptions and enum metadata only; tool behavior is unchanged.
New tool added
Prompts tested (tool changes only)
Security / limits
Tool renaming
deprecated_tool_aliases.goLint & tests
./script/lint./script/testDocs