git: clarify when NOT to call status/diff/log — cuts agent extra-call rate (measured +21.7 pts)#4520
Open
sujugithub wants to merge 1 commit into
Open
Conversation
Measured with an agent harness (12 scenarios x 5 runs each, live server): tool selection was already perfect (100% hit rate) but agents padded runs with ritual git_status/git_diff_staged/git_log verification calls. With only these description changes: strict success (right tool + right args + no extra calls) 75.0% -> 96.7%. No behavior changes.
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.
What
Rewrites 7 tool description strings in
src/git/src/mcp_server_git/server.py. No code or behavior changes — only the text agents read when choosing tools.Why
I measured how a mid-tier agent actually uses this server (12 realistic scenarios × 5 runs each, live server, every tool call recorded). Tool selection is already excellent — 100% hit rate, the diff-trio naming works. The failure mode is ritual verification calls: after
git_add, agents callgit_statusorgit_diff_stagedto check it worked; beforegit_show HEAD, they callgit_logto find a hash they don't need. A quarter of all runs were padded this way.Measured effect of this diff (nothing else changed)
Method: agent = gpt-oss-120b (deliberately mid-tier — weaker agents are hurt most by underspecified descriptions), N=5 runs per scenario, descriptions applied via in-memory override so before/after used the identical server build. Happy to share the full per-run data and scenario suite, or re-run against any revision of the wording.
Notes
git_showwording impliedrevisionwas optional; sinceGitShow.revisionis required, this PR saysPass revision=\"HEAD\"instead — same intent, schema-accurate.🤖 Generated with Claude Code