Repository navigation
Conversation
21 of the 32 tool input properties had no description, so a model saw only their names. Add shared RepoPath and ContextLines aliases next to DEFAULT_CONTEXT_LINES, use them for every repo_path and context_lines, and describe git_diff.target, git_commit.message, git_add.files, git_create_branch.branch_name, git_checkout.branch_name and git_show.revision. A protocol-level test lists the tools and fails on any input property without a description; the tool-list snapshot is regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
git_commit went through GitPython's index.commit(), whose parse_date() rejects ISO-8601 values native `git commit` accepts (a `Z` suffix, `+02:00` or `-0500` offsets, fractional seconds) and misreads RFC 2822 as UTC. Read each set variable through `git var GIT_<role>_IDENT`, so git's own date parser decides, and pass the `<timestamp> <offset>` it prints as the explicit author_date/commit_date on both the plain and the merge commit path. A value git rejects still fails the commit, now with git's message. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
git_branch returned `git branch` output verbatim: `* ` on the current branch, `+ ` on one checked out in a linked worktree, ANSI color under color.branch=always, `origin/HEAD -> origin/main`, and a `(HEAD detached at ...)` entry. None of that resolves as a revision, so a name kept from git_branch failed in git_checkout, git_diff, git_show and git_merge. List the refs with `git for-each-ref --format=%(refname)` under refs/heads/ and refs/remotes/ (keeping --contains / --no-contains) and shorten each the way `git branch` does, so every line is one bare, unambiguous ref name. Closes #5641 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
Started with --repository, the server's initialize result (2025-11-25) and server/discover result (2026-07-28) carry instructions naming the allowed repository root, resolved the way validate_repo_path compares it, and telling the model to pass exactly that path as repo_path. A model no longer has to guess a path and read the right one back from the refusal. repo_path stays required with one schema; unconfined, the server sends no instructions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
str.splitlines() also breaks on U+2028, U+0085 and other separators that git allows inside a ref name, so such a branch came back as pieces that resolve to nothing. Split on git's own record delimiter instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
…ructions' into v2/chore/5697-git-v2.7.0-rollup
…ons' into v2/chore/5697-git-v2.7.0-rollup
…' into v2/chore/5697-git-v2.7.0-rollup
…s' into v2/chore/5697-git-v2.7.0-rollup
|
|
| Tools | Prompts | Resources | Resource templates | |
|---|---|---|---|---|
| Base | 14 | 2 | 0 | 0 |
| Head | 14 | 2 | 0 | 0 |
initialize
--- base/initialize.json
+++ target/initialize.json
+ instructions: "This server is confined to the Git repository at /home/runner/work/servers/servers/node_modules/.cac..."tools
--- base/tools.json
+++ target/tools.json
+ tools[git_add].inputSchema.properties.files.description: "Paths of the files to stage, relative to the repository root or absolute inside it. ['.'] stages eve..."
+ tools[git_add].inputSchema.properties.repo_path.description: "The path to the Git repository."
+ tools[git_checkout].inputSchema.properties.branch_name.description: "The branch to switch to. A tag, commit SHA or remote-tracking branch is also accepted, and detaches ..."
+ tools[git_checkout].inputSchema.properties.repo_path.description: "The path to the Git repository."
+ tools[git_commit].inputSchema.properties.message.description: "The commit message"
+ tools[git_commit].inputSchema.properties.repo_path.description: "The path to the Git repository."
+ tools[git_create_branch].inputSchema.properties.branch_name.description: "The name of the new branch to create"
+ tools[git_create_branch].inputSchema.properties.repo_path.description: "The path to the Git repository."
+ tools[git_diff].inputSchema.properties.context_lines.description: "Number of context lines to show around each change. Defaults to 3."
+ tools[git_diff].inputSchema.properties.repo_path.description: "The path to the Git repository."
+ tools[git_diff].inputSchema.properties.target.description: "A branch, tag, commit SHA or relative revision (HEAD~1) to diff the working tree against, or a revis..."
+ tools[git_diff_staged].inputSchema.properties.context_lines.description: "Number of context lines to show around each change. Defaults to 3."
+ tools[git_diff_staged].inputSchema.properties.repo_path.description: "The path to the Git repository."
+ tools[git_diff_unstaged].inputSchema.properties.context_lines.description: "Number of context lines to show around each change. Defaults to 3."
+ tools[git_diff_unstaged].inputSchema.properties.repo_path.description: "The path to the Git repository."
+ tools[git_log].inputSchema.properties.repo_path.description: "The path to the Git repository."
+ tools[git_merge].inputSchema.properties.repo_path.description: "The path to the Git repository."
+ tools[git_reset].inputSchema.properties.repo_path.description: "The path to the Git repository."
+ tools[git_show].inputSchema.properties.repo_path.description: "The path to the Git repository."
+ tools[git_show].inputSchema.properties.revision.description: "The commit to show: a branch, tag, commit SHA or relative revision (HEAD~1). <revision>:<path> shows..."
+ tools[git_status].inputSchema.properties.repo_path.description: "The path to the Git repository."instructions
Endpoint added in target (not present in base)Updated by this run for b36de6f8a6facd4e5aef6db05b83660d7068acda.
|
Closing as intended. On head |
Part of #5697
Temporary rollup PR. Do not merge. It merges the four Git v2.7.0 PRs onto current
v2/mainto prove they work together. It will be closed once its CI is green, and then the constituent PRs are merged individually.instructionsname the allowed repository under--repositorygit_commitaccepts every date format native git doesgit_branchlists bare, usable ref namesThe four branches merged with no conflicts, and
npm run local:gateexited 0 on this head (b36de6f8). No Copilot review is requested on this PR; each constituent PR had its own.🤖 Generated with Claude Code