gitwand
v3.15.1Auto-resolves Git merge conflicts so agents only touch the complex hunks.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
gitwand_status
List conflicted files in the current Git repo with their complexity and auto-resolvability. Returns a structured JSON report with conflict counts, types, and confidence scores.
| Parameter | Type | Description |
|---|---|---|
cwd | string | Working directory (repo root). Defaults to server cwd. |
min_confidence_score | number | Apply only resolutions whose confidence scores >= this (0-100). Combined with the policy's own label threshold, never instead of it: raising it can only ever apply LESS, never more, so it can never le… |
regenerate | boolean | If true, report GitWand's regenerate-tier plan (lockfile ecosystem + whether it's currently runnable) for any declined generated file (e.g. package-lock.json), reusing the same file states this call a… |
gitwand_resolve_conflicts
Auto-resolve trivial Git merge conflicts using GitWand's pattern-based engine. Returns resolved files, DecisionTrace for each hunk, and pendingHunks for conflicts that need human/LLM review. Writes resolved files to disk unless dry_run is true.
| Parameter | Type | Description |
|---|---|---|
cwd | string | Working directory (repo root). Defaults to server cwd. |
dry_run | boolean | If true, analyze without writing files. Default: false. |
files | array | Specific files to resolve. If omitted, discovers all conflicted files from git. |
min_confidence_score | number | Apply only resolutions whose confidence scores >= this (0-100). Combined with the policy's own label threshold, never instead of it: raising it can only ever apply LESS, never more, so it can never le… |
policy | string | Merge policy to use. Default: prefer-theirs. |
regenerate | boolean | If true, report GitWand's regenerate-tier plan (lockfile ecosystem + whether it's currently runnable) for any declined generated file (e.g. package-lock.json), reusing the same file states this call a… |
gitwand_preview_merge
Side-effect-free Conflict Predictor. Simulates a merge, rebase, or cherry-pick and reports how many conflicts GitWand can auto-resolve vs. how many need manual/LLM attention, plus an overall risk level (low/medium/high). Does NOT modify the working tree, index, or HEAD. - operation 'merge' (default): analyzes conflicts already materialized in the working tree (files with conflict markers). - operation 'rebase': simulates rebasing HEAD onto `onto` (3-way against merge-base(HEAD, onto); HEAD's work is replayed on top of `onto`). - operation 'cherry-pick': simulates cherry-picking `commit` onto…
| Parameter | Type | Description |
|---|---|---|
commit | string | Required when operation is 'cherry-pick': the commit to simulate cherry-picking onto HEAD. |
cwd | string | Working directory (repo root). Defaults to server cwd. |
min_confidence_score | number | Apply only resolutions whose confidence scores >= this (0-100). Combined with the policy's own label threshold, never instead of it: raising it can only ever apply LESS, never more, so it can never le… |
onto | string | Required when operation is 'rebase': the branch/ref to rebase HEAD onto. |
operation | string | Operation to simulate. Default: 'merge'. |
regenerate | boolean | Only applies when operation is 'merge' (the default). If true, report GitWand's regenerate-tier plan (lockfile ecosystem + whether it's currently runnable) for any declined generated file (e.g. packag… |
gitwand_explain_hunk
Explain why a specific conflict hunk was classified as its type. Returns the DecisionTrace with each evaluation step and the ours/theirs/base content for context.
| Parameter | Type | Description |
|---|---|---|
file * | string | Path to the conflicted file (relative to cwd). |
line * | number | Start line of the hunk to explain. |
cwd | string | Working directory (repo root). Defaults to server cwd. |
gitwand_apply_resolution
Apply a custom resolution (provided by the LLM or user) to a specific conflict hunk. Replaces the conflict markers at the given line range with the provided content. Writes WITHOUT validating the result (no marker or syntax check): for an agent's own resolution prefer gitwand_resolve_hunk_llm, which validates before writing.
| Parameter | Type | Description |
|---|---|---|
content * | string | The resolved content to replace the conflict block with. An empty string removes the block entirely. |
file * | string | Path to the conflicted file (relative to cwd). |
line * | number | Start line of the conflict hunk (the <<<<<<< line). |
cwd | string | Working directory (repo root). Defaults to server cwd. |
gitwand_resolve_hunk
Ask the connected AI agent (the caller of this MCP server) to propose a resolution for a single Git merge conflict hunk. Returns a fully-formed prompt with the base/ours/theirs versions and asks the agent to reply with a JSON object { "resolution": "<merged code>", "reasoning": "<short explanation>" }. This tool does NOT call any external LLM — the agent that called the tool IS the LLM. Use it when GitWand (desktop/cli) wants to delegate the resolution of a `complex` hunk to the agent driving the session, instead of calling Anthropic/OpenAI directly. Pair the agent's answer with `gitwand_app…
| Parameter | Type | Description |
|---|---|---|
base * | string | Content of the hunk in the merge base (common ancestor). May be empty for hunks with no shared ancestor. |
filePath * | string | Path of the file containing the hunk (used by the agent to infer language and apply format-aware reasoning). |
ours * | string | Content of the hunk from the current branch (HEAD / ours side). |
theirs * | string | Content of the hunk from the incoming branch (theirs side). |
context | string | Optional surrounding code (a few lines above and below the hunk) so the agent can reason about intent. |
language | string | Optional language hint (e.g. "typescript", "python", "rust"). If omitted, the agent infers it from `filePath`. |
gitwand_resolve_hunk_llm
Validate and apply an LLM-proposed resolution for a specific conflict hunk. Reads the hunk at the given file+line, replaces it with the proposed resolution, validates the result (no residual markers; for JSON, YAML and TOML, a whole-file parse once no other hunk remains), and writes the file if the validation score meets the threshold. Returns the full audit trail (validation score, accepted/rejected, reason). Workflow: (1) call gitwand_status or gitwand_explain_hunk to see pending complex hunks, (2) propose a resolution, (3) call this tool to validate + apply it.
| Parameter | Type | Description |
|---|---|---|
file * | string | Path to the conflicted file (relative to cwd). |
line * | number | Start line of the conflict hunk (the <<<<<<< line, 1-indexed). |
resolution * | string | LLM-proposed resolution content — the lines that replace the conflict block. An empty string removes the block entirely. |
cwd | string | Working directory (repo root). Defaults to server cwd. |
dry_run | boolean | If true, validate but do NOT write the file. Default: false. |
min_score | number | Minimum validation score (0–100) to accept and write the resolution. Default: 80. |
gitwand_create_issue
File a GitHub issue on the repository in `cwd`, through the `gh` CLI (its login, or GH_TOKEN/GITHUB_TOKEN). PREVIEWS BY DEFAULT: without `dry_run: false` nothing is created, and the tool returns the target repository, the title, labels and assignees it would send, the body's length (the body is sent exactly as given), and what the secrets scan found, and a `previewId`. Show the user that preview with the body you passed; only once they agree, call again with the same arguments plus `dry_run: false` and that `preview_id` (a create without it, with changed arguments, or more than an hour later,…
| Parameter | Type | Description |
|---|---|---|
title * | string | Issue title (1-256 characters, trimmed). |
assignees | array | GitHub logins to assign (`@me` for the signed-in user). |
body | string | Issue body, Markdown, sent verbatim (at most 65,536 characters). |
cwd | string | Working directory (repo root). Defaults to server cwd. |
dry_run | boolean | Default: true — preview only. Pass false to create the issue, after the user has seen the preview. |
labels | array | Label names; each must already exist on the target repository. |
preview_id | string | Required with dry_run: false: the `previewId` of a preview of this very issue (same title, body, labels, assignees and target). |
repo | string | `owner/repo` to file on: the origin repository or its fork parent. Defaults to origin, or the parent when origin takes no issues. |