@rethunk/mcp-multi-root-git 2.3.3 → 2.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -36,6 +36,7 @@ IDEs injecting this as context: do not re-link from rules.
36
36
  | [`src/server/git-cherry-pick-tool.ts`](src/server/git-cherry-pick-tool.ts) | `git_cherry_pick` — mutating |
37
37
  | [`src/server/git-reset-soft-tool.ts`](src/server/git-reset-soft-tool.ts) | `git_reset_soft` — soft-reset; mutating |
38
38
  | [`src/server/presets-resource.ts`](src/server/presets-resource.ts) | `rethunk-git://presets` resource |
39
+ | [`src/server/tool-parameter-schemas.ts`](src/server/tool-parameter-schemas.ts) | `buildToolParameterSchemaDocument`, `captureToolParameterSchemas`; backs `tool-parameters.schema.json` |
39
40
  | [`src/repo-paths.ts`](src/repo-paths.ts) | `resolvePathForRepo`, `assertRelativePathUnderTop`, `isStrictlyUnderGitTop` |
40
41
 
41
42
  ## Changing contracts
@@ -47,7 +48,7 @@ IDEs injecting this as context: do not re-link from rules.
47
48
 
48
49
  ## Validate + CI
49
50
 
50
- Local: `bun run build` | `bun run check` | `bun run test`. CI ([`ci.yml`](.github/workflows/ci.yml)) runs same on PRs + `main` after `bun install --frozen-lockfile`, uploads prerelease `npm pack` artifact. Tag `v*.*.*` matching `package.json` version → [`release.yml`](.github/workflows/release.yml) publishes to GitHub Packages as `@rethunk-ai/mcp-multi-root-git` + cuts GitHub Release. npmjs publish is manual (see [HUMANS.md](HUMANS.md)).
51
+ Local: `bun run build` | `bun run check` | `bun run schema:tools:check` | `bun run test`. CI ([`ci.yml`](.github/workflows/ci.yml)) runs same on PRs + `main` after `bun install --frozen-lockfile`, then `bun run test:coverage` + `bun run coverage:check`, and uploads prerelease `npm pack` artifact. Tag `v*.*.*` matching `package.json` version → [`release.yml`](.github/workflows/release.yml) publishes to GitHub Packages as `@rethunk-ai/mcp-multi-root-git` + cuts GitHub Release. npmjs publish is manual (see [HUMANS.md](HUMANS.md)).
51
52
 
52
53
  Optional [`.githooks/`](.githooks): `bun run setup-hooks` once per clone. pre-commit=`check`; pre-push=frozen install + build + check + test.
53
54
 
package/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  All notable changes to `@rethunk/mcp-multi-root-git` are documented here. Format loosely follows [Keep a Changelog](https://keepachangelog.com); the project uses [Semantic Versioning](https://semver.org).
4
4
 
5
+ ## [2.3.4] — 2026-04-26
6
+
7
+ Publication-prep patch for the `absoluteGitRoots` line.
8
+
9
+ ### Added
10
+
11
+ - **`tool-parameters.schema.json`** — generated JSON Schema snapshot for every registered tool parameter surface, plus `bun run schema:tools` / `bun run schema:tools:check`.
12
+ - **`git_parity` absolute-root regression coverage** — sibling clone batches are now covered directly.
13
+
14
+ ### Fixed
15
+
16
+ - **CI coverage gate** now checks `% Lines` from Bun's coverage table instead of accidentally reading `% Funcs`.
17
+
18
+ ### Documentation
19
+
20
+ - **`HUMANS.md`** — added sibling-clone `absoluteGitRoots` examples for `git_status` and `git_parity`.
21
+ - **`docs/mcp-tools.md`** — clarified direct `git_push` use for already-committed work and `git_parity` sibling-clone batches.
22
+
5
23
  ## [2.3.3] — 2026-04-21
6
24
 
7
25
  ### Added
package/HUMANS.md CHANGED
@@ -53,6 +53,22 @@ With **multiple MCP file roots**, the server picks a root whose git toplevel def
53
53
 
54
54
  If you installed from **GitHub Packages**, use **`./node_modules/@rethunk-ai/mcp-multi-root-git/git-mcp-presets.schema.json`** in **`$schema`** instead (see [docs/install.md](docs/install.md#github-packages)).
55
55
 
56
+ ## Tool parameter schema artifact
57
+
58
+ The package ships **`tool-parameters.schema.json`**, a generated JSON Schema snapshot of every registered tool's parameter schema. Maintainers regenerate it with:
59
+
60
+ ```bash
61
+ bun run schema:tools
62
+ ```
63
+
64
+ CI and `prepublishOnly` use:
65
+
66
+ ```bash
67
+ bun run schema:tools:check
68
+ ```
69
+
70
+ This artifact is for inspection, drift checks, and clients that want an offline schema snapshot. Runtime MCP schema discovery remains the source of truth for connected clients.
71
+
56
72
  **Layouts:**
57
73
 
58
74
  1. **Wrapped (recommended):** `{ "schemaVersion": "1", "presets": { "<name>": { ... } } }`.
@@ -74,6 +90,37 @@ Invalid JSON or schema errors return **`preset_file_invalid`** (not a silent emp
74
90
 
75
91
  Relative preset paths must stay inside the git toplevel; escapes are rejected.
76
92
 
93
+ ## Sibling clone batches
94
+
95
+ Use **`absoluteGitRoots`** when you want one read-only call to inspect independent sibling clones that are not all exposed as MCP workspace roots. This is most useful from agent workflows rooted at a parent directory or when an MCP client exposes only one repo root.
96
+
97
+ Example `git_status` batch:
98
+
99
+ ```json
100
+ {
101
+ "format": "json",
102
+ "absoluteGitRoots": [
103
+ "/usr/local/src/com.github/Rethunk-AI/mcp-multi-root-git",
104
+ "/usr/local/src/com.github/Rethunk-AI/rethunk-github-mcp"
105
+ ]
106
+ }
107
+ ```
108
+
109
+ Example `git_parity` batch using the same pair in each sibling clone:
110
+
111
+ ```json
112
+ {
113
+ "format": "json",
114
+ "absoluteGitRoots": [
115
+ "/usr/local/src/com.github/Rethunk-AI/mcp-multi-root-git",
116
+ "/usr/local/src/com.github/Rethunk-AI/rethunk-github-mcp"
117
+ ],
118
+ "pairs": [{ "left": "packages/shared", "right": "apps/web/shared", "label": "shared" }]
119
+ }
120
+ ```
121
+
122
+ `absoluteGitRoots` is read-only by design. Mutating tools such as **`batch_commit`**, **`git_push`**, **`git_merge`**, and **`git_cherry_pick`** omit it from their schema; use `workspaceRoot` or MCP roots for writes. Full parameter rules and error codes live in **[docs/mcp-tools.md](docs/mcp-tools.md#absoluteGitRoots-sibling-clones)**.
123
+
77
124
  ## `git_not_found`
78
125
 
79
126
  If **`git`** is missing or not runnable, tools and the presets resource respond with **`git_not_found`**. Prerequisites and `PATH`: **[docs/install.md](docs/install.md)**.
@@ -97,6 +144,14 @@ Tag pushes run [`.github/workflows/release.yml`](.github/workflows/release.yml):
97
144
 
98
145
  Prerequisite: push a **semver git tag** `vX.Y.Z` that **exactly matches** `version` in `package.json` (e.g. `v1.2.3` and `"version": "1.2.3"`).
99
146
 
147
+ Before tagging, run the clean-tree preflight from the release commit:
148
+
149
+ ```bash
150
+ bun run publish:preflight
151
+ ```
152
+
153
+ It verifies the `package.json` version has a matching `CHANGELOG.md` section, generated tool schemas are current, build/check/coverage pass, and `npm pack --dry-run` includes the expected package files.
154
+
100
155
  ### npmjs (manual) — maintainers only
101
156
 
102
157
  npmjs no longer fits an unattended CI publish flow for this org; **do not** rely on automation to [npmjs](https://www.npmjs.com/package/@rethunk/mcp-multi-root-git). To publish the **same** package name consumers already use (**`@rethunk/mcp-multi-root-git`**):
@@ -0,0 +1,22 @@
1
+ export function parseAllFilesLineCoverage(output) {
2
+ const rows = output
3
+ .split(/\r?\n/)
4
+ .map((line) => line.trim())
5
+ .filter((line) => line.includes("|"));
6
+ const header = rows.find((line) => /^File\s*\|/i.test(line));
7
+ if (!header)
8
+ return null;
9
+ const columns = header.split("|").map((column) => column.trim().toLowerCase());
10
+ const lineIndex = columns.indexOf("% lines");
11
+ if (lineIndex === -1)
12
+ return null;
13
+ const allFiles = rows.find((line) => /^All files\s*\|/i.test(line));
14
+ if (!allFiles)
15
+ return null;
16
+ const cells = allFiles.split("|").map((cell) => cell.trim());
17
+ const raw = cells[lineIndex];
18
+ if (!raw)
19
+ return null;
20
+ const value = Number.parseFloat(raw);
21
+ return Number.isFinite(value) ? value : null;
22
+ }
@@ -62,7 +62,10 @@ function makeFakeServer() {
62
62
  const server = {
63
63
  sessions: [],
64
64
  addTool(tool) {
65
- tools.push({ name: tool.name, execute: tool.execute });
65
+ tools.push({ name: tool.name, parameters: tool.parameters, execute: tool.execute });
66
+ },
67
+ addResource() {
68
+ // Resource tests do not need transport behavior; tool-surface tests only need registration to complete.
66
69
  },
67
70
  };
68
71
  return { server, tools };
@@ -89,3 +92,8 @@ export function captureTool(register, toolName) {
89
92
  return JSON.stringify(result);
90
93
  };
91
94
  }
95
+ export function captureToolDefinitions(register) {
96
+ const { server, tools } = makeFakeServer();
97
+ register(server);
98
+ return tools;
99
+ }
@@ -0,0 +1,74 @@
1
+ import { z } from "zod";
2
+ import { registerBatchCommitTool } from "./batch-commit-tool.js";
3
+ import { registerGitCherryPickTool } from "./git-cherry-pick-tool.js";
4
+ import { registerGitDiffSummaryTool } from "./git-diff-summary-tool.js";
5
+ import { registerGitInventoryTool } from "./git-inventory-tool.js";
6
+ import { registerGitLogTool } from "./git-log-tool.js";
7
+ import { registerGitMergeTool } from "./git-merge-tool.js";
8
+ import { registerGitParityTool } from "./git-parity-tool.js";
9
+ import { registerGitPushTool } from "./git-push-tool.js";
10
+ import { registerGitResetSoftTool } from "./git-reset-soft-tool.js";
11
+ import { registerGitStatusTool } from "./git-status-tool.js";
12
+ import { registerGitWorktreeAddTool, registerGitWorktreeListTool, registerGitWorktreeRemoveTool, } from "./git-worktree-tool.js";
13
+ import { registerListPresetsTool } from "./list-presets-tool.js";
14
+ export const READ_ONLY_ABSOLUTE_ROOT_TOOLS = [
15
+ "git_status",
16
+ "git_inventory",
17
+ "git_parity",
18
+ "list_presets",
19
+ "git_log",
20
+ "git_diff_summary",
21
+ ];
22
+ export const MUTATING_TOOLS = [
23
+ "batch_commit",
24
+ "git_push",
25
+ "git_merge",
26
+ "git_cherry_pick",
27
+ "git_reset_soft",
28
+ "git_worktree_add",
29
+ "git_worktree_remove",
30
+ ];
31
+ export const ALL_PARAMETER_SCHEMA_TOOLS = [
32
+ ...READ_ONLY_ABSOLUTE_ROOT_TOOLS,
33
+ "git_worktree_list",
34
+ ...MUTATING_TOOLS,
35
+ ];
36
+ function captureParameterTools(register) {
37
+ const tools = [];
38
+ const server = {
39
+ sessions: [],
40
+ addTool(tool) {
41
+ tools.push({ name: tool.name, parameters: tool.parameters });
42
+ },
43
+ };
44
+ register(server);
45
+ return tools;
46
+ }
47
+ export function captureToolParameterSchemas() {
48
+ const tools = captureParameterTools((server) => {
49
+ registerGitStatusTool(server);
50
+ registerGitInventoryTool(server);
51
+ registerGitParityTool(server);
52
+ registerListPresetsTool(server);
53
+ registerGitLogTool(server);
54
+ registerGitDiffSummaryTool(server);
55
+ registerGitWorktreeListTool(server);
56
+ registerBatchCommitTool(server);
57
+ registerGitPushTool(server);
58
+ registerGitMergeTool(server);
59
+ registerGitCherryPickTool(server);
60
+ registerGitResetSoftTool(server);
61
+ registerGitWorktreeAddTool(server);
62
+ registerGitWorktreeRemoveTool(server);
63
+ });
64
+ return Object.fromEntries(tools.map((tool) => [tool.name, z.toJSONSchema(tool.parameters)]));
65
+ }
66
+ export function buildToolParameterSchemaDocument() {
67
+ return {
68
+ $schema: "https://json-schema.org/draft/2020-12/schema",
69
+ title: "@rethunk/mcp-multi-root-git tool parameter schemas",
70
+ description: "JSON Schema snapshots generated from registered FastMCP tool parameter schemas.",
71
+ generatedBy: "scripts/generate-tool-parameters-schema.ts",
72
+ tools: captureToolParameterSchemas(),
73
+ };
74
+ }
package/docs/mcp-tools.md CHANGED
@@ -13,7 +13,7 @@ MCP clients expose tools as `{serverName}_{toolName}`. With the server registere
13
13
  |----------|-----------------------------------|---------|
14
14
  | `git_status` | `rethunk-git_git_status` | `git status --short -b` per MCP root and optional submodules (`includeSubmodules`); parallel submodule status. Args include `absoluteGitRoots`, `allWorkspaceRoots`, `rootIndex`, `workspaceRoot`, `format`. **Read-only.** |
15
15
  | `git_inventory` | `rethunk-git_git_inventory` | Status + ahead/behind per path; default upstream each repo’s `@{u}`; pass **both** `remote` and `branch` for fixed tracking. `nestedRoots`, `preset`, `presetMerge`, `maxRoots`, `format`, plus workspace pick args (`absoluteGitRoots` cannot combine with `preset`/`nestedRoots`). **Read-only.** |
16
- | `git_parity` | `rethunk-git_git_parity` | Compare `git rev-parse HEAD` for path pairs. `pairs`, `preset`, `presetMerge`, `format`, plus workspace pick args. **Read-only.** |
16
+ | `git_parity` | `rethunk-git_git_parity` | Compare `git rev-parse HEAD` for path pairs. `pairs`, `preset`, `presetMerge`, `format`, plus workspace pick args (`absoluteGitRoots` for sibling clone batches). **Read-only.** |
17
17
  | `list_presets` | `rethunk-git_list_presets` | List preset names/counts from `.rethunk/git-mcp-presets.json`; invalid JSON/schema surface as errors. Workspace pick + `format` only (includes `absoluteGitRoots`). **Read-only.** |
18
18
  | `git_log` | `rethunk-git_git_log` | Path-filtered, time-windowed `git log` across one or more workspace roots. Returns commit history with author, date, subject, and shortstat. Args: `since`, `paths`, `grep`, `author`, `maxCommits`, `branch`, plus workspace pick args (`absoluteGitRoots` for sibling clones) + `format`. **Read-only.** |
19
19
  | `git_diff_summary` | `rethunk-git_git_diff_summary` | Structured, token-efficient diff viewer. Returns per-file diffs with additions/deletions counts, truncated to configurable line limits, with lock files/dist/vendor excluded by default. Args: `range`, `fileFilter`, `maxLinesPerFile`, `maxFiles`, `excludePatterns`, plus workspace pick args (optional single-entry `absoluteGitRoots`) + `format`. **Read-only.** |
@@ -32,6 +32,8 @@ Pass **`format: "json"`** on any tool for structured JSON instead of markdown (d
32
32
 
33
33
  Tool JSON bodies are minified and contain only the payload — no `rethunkGitMcp` envelope. Current `MCP_JSON_FORMAT_VERSION` is **`"3"`**; server + format version are discoverable via MCP `initialize`. Payload keys (`groups`, `inventories`, `parity`, `roots`) are stable within a given format version. Preset-related responses may include **`presetSchemaVersion`**.
34
34
 
35
+ The package also ships **`tool-parameters.schema.json`**, generated from the registered Zod parameter schemas via `bun run schema:tools`. Connected MCP clients should still prefer live schema discovery from `initialize` / tool listing; the artifact is for offline inspection and drift checks.
36
+
35
37
  ### v2/v3 field omission (consumer contract)
36
38
 
37
39
  To keep responses compact, **optional fields are omitted when they would be empty, `null`, or `false`** — they are not emitted as `null`. Consumers must test for *presence*, not compare to `null`.
@@ -113,6 +115,23 @@ v2 field-omission rules still apply: `filesChanged`, `insertions`, `deletions` o
113
115
  | `absolute_git_roots_empty` | `absoluteGitRoots` produced zero git toplevels after resolution. |
114
116
  | `absolute_git_roots_single_repo_only` | A single-repo tool received `absoluteGitRoots` resolving to more than one distinct git toplevel. |
115
117
 
118
+ ### `git_parity` — `absoluteGitRoots` example
119
+
120
+ Use **`absoluteGitRoots`** when the same parity pair should be checked across sibling clones that are not all MCP workspace roots:
121
+
122
+ ```json
123
+ {
124
+ "format": "json",
125
+ "absoluteGitRoots": [
126
+ "/usr/local/src/com.github/Rethunk-AI/mcp-multi-root-git",
127
+ "/usr/local/src/com.github/Rethunk-AI/rethunk-github-mcp"
128
+ ],
129
+ "pairs": [{ "left": "packages/shared", "right": "apps/web/shared", "label": "shared" }]
130
+ }
131
+ ```
132
+
133
+ The response contains one **`parity[]`** entry per resolved git toplevel. `absoluteGitRoots` cannot be combined with `preset`; pass inline `pairs` for sibling-clone batches.
134
+
116
135
  ### `git_diff_summary` — parameters
117
136
 
118
137
  | Parameter | Type | Default | Notes |
@@ -352,6 +371,8 @@ Repo state is cleaned (`git cherry-pick --abort`) before returning — no partia
352
371
 
353
372
  ### `git_push` — parameters
354
373
 
374
+ For already-committed work, call **`git_push`** directly instead of creating an empty commit or falling back to shell. Continue to prefer **`batch_commit`** with **`push: "after"`** when commits and push happen in the same MCP call.
375
+
355
376
  | Parameter | Type | Notes |
356
377
  |-----------|------|-------|
357
378
  | `remote` | string | Remote to push to. Defaults to the remote inferred from the upstream tracking ref, or `origin` when `setUpstream` is true. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rethunk/mcp-multi-root-git",
3
- "version": "2.3.3",
3
+ "version": "2.3.4",
4
4
  "description": "MCP stdio server: multi-root git status, inventory, and HEAD parity checks. Generic tools usable by any workspace.",
5
5
  "type": "module",
6
6
  "private": false,
@@ -11,6 +11,7 @@
11
11
  "files": [
12
12
  "dist",
13
13
  "git-mcp-presets.schema.json",
14
+ "tool-parameters.schema.json",
14
15
  "docs/install.md",
15
16
  "docs/mcp-tools.md",
16
17
  "AGENTS.md",
@@ -31,9 +32,13 @@
31
32
  "build": "rimraf dist && tsc",
32
33
  "check": "biome check .",
33
34
  "check:fix": "biome check --write .",
35
+ "coverage:check": "bun scripts/check-coverage.ts",
36
+ "schema:tools": "bun scripts/generate-tool-parameters-schema.ts",
37
+ "schema:tools:check": "bun scripts/generate-tool-parameters-schema.ts --check",
38
+ "publish:preflight": "bun scripts/publish-preflight.ts",
34
39
  "test": "bun test src/",
35
40
  "test:coverage": "bun test src/ --coverage",
36
- "prepublishOnly": "bun run build && bun run check && bun run test",
41
+ "prepublishOnly": "bun run schema:tools:check && bun run build && bun run check && bun run test",
37
42
  "setup-hooks": "git config core.hooksPath .githooks"
38
43
  },
39
44
  "keywords": [
@@ -57,13 +62,13 @@
57
62
  "access": "public"
58
63
  },
59
64
  "dependencies": {
60
- "fastmcp": "^3.35.0",
65
+ "fastmcp": "^4.0.1",
61
66
  "zod": "^4.3.6"
62
67
  },
63
68
  "devDependencies": {
64
- "@biomejs/biome": "^2.4.11",
65
- "@types/node": "^22.19.17",
69
+ "@biomejs/biome": "^2.4.13",
70
+ "@types/node": "^25.6.0",
66
71
  "rimraf": "^6.1.3",
67
- "typescript": "^6.0.2"
72
+ "typescript": "^6.0.3"
68
73
  }
69
74
  }
@@ -0,0 +1,812 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "@rethunk/mcp-multi-root-git tool parameter schemas",
4
+ "description": "JSON Schema snapshots generated from registered FastMCP tool parameter schemas.",
5
+ "generatedBy": "scripts/generate-tool-parameters-schema.ts",
6
+ "tools": {
7
+ "git_status": {
8
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
9
+ "type": "object",
10
+ "properties": {
11
+ "workspaceRoot": {
12
+ "description": "Highest-priority override.",
13
+ "type": "string"
14
+ },
15
+ "rootIndex": {
16
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
17
+ "type": "integer",
18
+ "minimum": 0,
19
+ "maximum": 9007199254740991
20
+ },
21
+ "allWorkspaceRoots": {
22
+ "default": false,
23
+ "description": "Fan out across all MCP file roots.",
24
+ "type": "boolean"
25
+ },
26
+ "absoluteGitRoots": {
27
+ "description": "Absolute paths to git repo roots. Use for many sibling clones under a non-git parent directory.",
28
+ "maxItems": 256,
29
+ "type": "array",
30
+ "items": {
31
+ "type": "string"
32
+ }
33
+ },
34
+ "format": {
35
+ "default": "markdown",
36
+ "type": "string",
37
+ "enum": [
38
+ "markdown",
39
+ "json"
40
+ ]
41
+ },
42
+ "includeSubmodules": {
43
+ "default": true,
44
+ "type": "boolean"
45
+ }
46
+ },
47
+ "required": [
48
+ "allWorkspaceRoots",
49
+ "format",
50
+ "includeSubmodules"
51
+ ],
52
+ "additionalProperties": false
53
+ },
54
+ "git_inventory": {
55
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
56
+ "type": "object",
57
+ "properties": {
58
+ "workspaceRoot": {
59
+ "description": "Highest-priority override.",
60
+ "type": "string"
61
+ },
62
+ "rootIndex": {
63
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
64
+ "type": "integer",
65
+ "minimum": 0,
66
+ "maximum": 9007199254740991
67
+ },
68
+ "allWorkspaceRoots": {
69
+ "default": false,
70
+ "description": "Fan out across all MCP file roots.",
71
+ "type": "boolean"
72
+ },
73
+ "absoluteGitRoots": {
74
+ "description": "Absolute paths to git repo roots. Use for many sibling clones under a non-git parent directory.",
75
+ "maxItems": 256,
76
+ "type": "array",
77
+ "items": {
78
+ "type": "string"
79
+ }
80
+ },
81
+ "format": {
82
+ "default": "markdown",
83
+ "type": "string",
84
+ "enum": [
85
+ "markdown",
86
+ "json"
87
+ ]
88
+ },
89
+ "nestedRoots": {
90
+ "type": "array",
91
+ "items": {
92
+ "type": "string"
93
+ }
94
+ },
95
+ "preset": {
96
+ "type": "string"
97
+ },
98
+ "presetMerge": {
99
+ "default": false,
100
+ "description": "Merge with preset instead of replacing.",
101
+ "type": "boolean"
102
+ },
103
+ "remote": {
104
+ "description": "Pair with `branch`.",
105
+ "type": "string"
106
+ },
107
+ "branch": {
108
+ "description": "Pair with `remote`.",
109
+ "type": "string"
110
+ },
111
+ "maxRoots": {
112
+ "default": 64,
113
+ "type": "integer",
114
+ "minimum": 1,
115
+ "maximum": 256
116
+ }
117
+ },
118
+ "required": [
119
+ "allWorkspaceRoots",
120
+ "format",
121
+ "presetMerge",
122
+ "maxRoots"
123
+ ],
124
+ "additionalProperties": false
125
+ },
126
+ "git_parity": {
127
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
128
+ "type": "object",
129
+ "properties": {
130
+ "workspaceRoot": {
131
+ "description": "Highest-priority override.",
132
+ "type": "string"
133
+ },
134
+ "rootIndex": {
135
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
136
+ "type": "integer",
137
+ "minimum": 0,
138
+ "maximum": 9007199254740991
139
+ },
140
+ "allWorkspaceRoots": {
141
+ "default": false,
142
+ "description": "Fan out across all MCP file roots.",
143
+ "type": "boolean"
144
+ },
145
+ "absoluteGitRoots": {
146
+ "description": "Absolute paths to git repo roots. Use for many sibling clones under a non-git parent directory.",
147
+ "maxItems": 256,
148
+ "type": "array",
149
+ "items": {
150
+ "type": "string"
151
+ }
152
+ },
153
+ "format": {
154
+ "default": "markdown",
155
+ "type": "string",
156
+ "enum": [
157
+ "markdown",
158
+ "json"
159
+ ]
160
+ },
161
+ "pairs": {
162
+ "type": "array",
163
+ "items": {
164
+ "type": "object",
165
+ "properties": {
166
+ "left": {
167
+ "type": "string"
168
+ },
169
+ "right": {
170
+ "type": "string"
171
+ },
172
+ "label": {
173
+ "type": "string"
174
+ }
175
+ },
176
+ "required": [
177
+ "left",
178
+ "right"
179
+ ],
180
+ "additionalProperties": false
181
+ }
182
+ },
183
+ "preset": {
184
+ "type": "string"
185
+ },
186
+ "presetMerge": {
187
+ "default": false,
188
+ "type": "boolean"
189
+ }
190
+ },
191
+ "required": [
192
+ "allWorkspaceRoots",
193
+ "format",
194
+ "presetMerge"
195
+ ],
196
+ "additionalProperties": false
197
+ },
198
+ "list_presets": {
199
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
200
+ "type": "object",
201
+ "properties": {
202
+ "workspaceRoot": {
203
+ "description": "Highest-priority override.",
204
+ "type": "string"
205
+ },
206
+ "rootIndex": {
207
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
208
+ "type": "integer",
209
+ "minimum": 0,
210
+ "maximum": 9007199254740991
211
+ },
212
+ "allWorkspaceRoots": {
213
+ "default": false,
214
+ "description": "Fan out across all MCP file roots.",
215
+ "type": "boolean"
216
+ },
217
+ "absoluteGitRoots": {
218
+ "description": "Absolute paths to git repo roots. Use for many sibling clones under a non-git parent directory.",
219
+ "maxItems": 256,
220
+ "type": "array",
221
+ "items": {
222
+ "type": "string"
223
+ }
224
+ },
225
+ "format": {
226
+ "default": "markdown",
227
+ "type": "string",
228
+ "enum": [
229
+ "markdown",
230
+ "json"
231
+ ]
232
+ }
233
+ },
234
+ "required": [
235
+ "allWorkspaceRoots",
236
+ "format"
237
+ ],
238
+ "additionalProperties": false
239
+ },
240
+ "git_log": {
241
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
242
+ "type": "object",
243
+ "properties": {
244
+ "workspaceRoot": {
245
+ "description": "Highest-priority override.",
246
+ "type": "string"
247
+ },
248
+ "rootIndex": {
249
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
250
+ "type": "integer",
251
+ "minimum": 0,
252
+ "maximum": 9007199254740991
253
+ },
254
+ "allWorkspaceRoots": {
255
+ "default": false,
256
+ "description": "Fan out across all MCP file roots.",
257
+ "type": "boolean"
258
+ },
259
+ "absoluteGitRoots": {
260
+ "description": "Absolute paths to git repo roots. Use for many sibling clones under a non-git parent directory.",
261
+ "maxItems": 256,
262
+ "type": "array",
263
+ "items": {
264
+ "type": "string"
265
+ }
266
+ },
267
+ "format": {
268
+ "default": "markdown",
269
+ "type": "string",
270
+ "enum": [
271
+ "markdown",
272
+ "json"
273
+ ]
274
+ },
275
+ "since": {
276
+ "description": "Passed to `git log --since=`. Accepts ISO timestamps or git relative forms like `48.hours` or `2.weeks.ago`. Default: `7.days`.",
277
+ "type": "string"
278
+ },
279
+ "paths": {
280
+ "description": "Limit to commits touching these paths (passed as `-- <paths>`).",
281
+ "type": "array",
282
+ "items": {
283
+ "type": "string"
284
+ }
285
+ },
286
+ "grep": {
287
+ "description": "Filter commits whose message matches this regex (git `--grep`, case-insensitive).",
288
+ "type": "string"
289
+ },
290
+ "author": {
291
+ "description": "Filter by author name or email (passed as `--author=`).",
292
+ "type": "string"
293
+ },
294
+ "maxCommits": {
295
+ "default": 50,
296
+ "description": "Maximum commits to return per root (hard cap 500). Default 50.",
297
+ "type": "integer",
298
+ "minimum": 1,
299
+ "maximum": 500
300
+ },
301
+ "branch": {
302
+ "description": "Ref/branch to log from. Default: HEAD.",
303
+ "type": "string"
304
+ }
305
+ },
306
+ "required": [
307
+ "allWorkspaceRoots",
308
+ "format",
309
+ "maxCommits"
310
+ ],
311
+ "additionalProperties": false
312
+ },
313
+ "git_diff_summary": {
314
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
315
+ "type": "object",
316
+ "properties": {
317
+ "workspaceRoot": {
318
+ "description": "Highest-priority override.",
319
+ "type": "string"
320
+ },
321
+ "rootIndex": {
322
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
323
+ "type": "integer",
324
+ "minimum": 0,
325
+ "maximum": 9007199254740991
326
+ },
327
+ "allWorkspaceRoots": {
328
+ "default": false,
329
+ "description": "Fan out across all MCP file roots.",
330
+ "type": "boolean"
331
+ },
332
+ "absoluteGitRoots": {
333
+ "description": "Absolute paths to git repo roots. Use for many sibling clones under a non-git parent directory.",
334
+ "maxItems": 256,
335
+ "type": "array",
336
+ "items": {
337
+ "type": "string"
338
+ }
339
+ },
340
+ "format": {
341
+ "default": "markdown",
342
+ "type": "string",
343
+ "enum": [
344
+ "markdown",
345
+ "json"
346
+ ]
347
+ },
348
+ "range": {
349
+ "description": "Diff range. Examples: \"staged\", \"HEAD~3..HEAD\", \"main...feature\". Default: unstaged changes.",
350
+ "type": "string"
351
+ },
352
+ "fileFilter": {
353
+ "description": "Glob pattern to restrict output to matching files, e.g. \"*.ts\", \"src/**\".",
354
+ "type": "string"
355
+ },
356
+ "maxLinesPerFile": {
357
+ "default": 50,
358
+ "description": "Max diff lines to include per file. Default: 50.",
359
+ "type": "integer",
360
+ "minimum": 1,
361
+ "maximum": 2000
362
+ },
363
+ "maxFiles": {
364
+ "default": 30,
365
+ "description": "Max files to include in output. Default: 30.",
366
+ "type": "integer",
367
+ "minimum": 1,
368
+ "maximum": 500
369
+ },
370
+ "excludePatterns": {
371
+ "description": "Glob patterns to exclude. Defaults to common noise: lock files, dist, vendor, etc.",
372
+ "type": "array",
373
+ "items": {
374
+ "type": "string"
375
+ }
376
+ }
377
+ },
378
+ "required": [
379
+ "allWorkspaceRoots",
380
+ "format",
381
+ "maxLinesPerFile",
382
+ "maxFiles"
383
+ ],
384
+ "additionalProperties": false
385
+ },
386
+ "git_worktree_list": {
387
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
388
+ "type": "object",
389
+ "properties": {
390
+ "workspaceRoot": {
391
+ "description": "Highest-priority override.",
392
+ "type": "string"
393
+ },
394
+ "rootIndex": {
395
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
396
+ "type": "integer",
397
+ "minimum": 0,
398
+ "maximum": 9007199254740991
399
+ },
400
+ "format": {
401
+ "default": "markdown",
402
+ "type": "string",
403
+ "enum": [
404
+ "markdown",
405
+ "json"
406
+ ]
407
+ }
408
+ },
409
+ "required": [
410
+ "format"
411
+ ],
412
+ "additionalProperties": false
413
+ },
414
+ "batch_commit": {
415
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
416
+ "type": "object",
417
+ "properties": {
418
+ "workspaceRoot": {
419
+ "description": "Highest-priority override.",
420
+ "type": "string"
421
+ },
422
+ "rootIndex": {
423
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
424
+ "type": "integer",
425
+ "minimum": 0,
426
+ "maximum": 9007199254740991
427
+ },
428
+ "allWorkspaceRoots": {
429
+ "default": false,
430
+ "description": "Fan out across all MCP file roots.",
431
+ "type": "boolean"
432
+ },
433
+ "format": {
434
+ "default": "markdown",
435
+ "type": "string",
436
+ "enum": [
437
+ "markdown",
438
+ "json"
439
+ ]
440
+ },
441
+ "commits": {
442
+ "minItems": 1,
443
+ "maxItems": 50,
444
+ "type": "array",
445
+ "items": {
446
+ "type": "object",
447
+ "properties": {
448
+ "message": {
449
+ "type": "string",
450
+ "minLength": 1,
451
+ "description": "Commit message."
452
+ },
453
+ "files": {
454
+ "minItems": 1,
455
+ "type": "array",
456
+ "items": {
457
+ "type": "string",
458
+ "minLength": 1
459
+ },
460
+ "description": "Paths to stage, relative to the git root."
461
+ }
462
+ },
463
+ "required": [
464
+ "message",
465
+ "files"
466
+ ],
467
+ "additionalProperties": false
468
+ },
469
+ "description": "Commits to create, applied in order."
470
+ },
471
+ "push": {
472
+ "default": "never",
473
+ "description": "`never` (default): no push. `after`: push the current branch to its upstream once all commits succeed; fails with `push_no_upstream` if the branch has no upstream (commits are NOT rolled back). Enum reserved for future modes such as `force-with-lease`.",
474
+ "type": "string",
475
+ "enum": [
476
+ "never",
477
+ "after"
478
+ ]
479
+ }
480
+ },
481
+ "required": [
482
+ "allWorkspaceRoots",
483
+ "format",
484
+ "commits",
485
+ "push"
486
+ ],
487
+ "additionalProperties": false
488
+ },
489
+ "git_push": {
490
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
491
+ "type": "object",
492
+ "properties": {
493
+ "workspaceRoot": {
494
+ "description": "Highest-priority override.",
495
+ "type": "string"
496
+ },
497
+ "rootIndex": {
498
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
499
+ "type": "integer",
500
+ "minimum": 0,
501
+ "maximum": 9007199254740991
502
+ },
503
+ "allWorkspaceRoots": {
504
+ "default": false,
505
+ "description": "Fan out across all MCP file roots.",
506
+ "type": "boolean"
507
+ },
508
+ "format": {
509
+ "default": "markdown",
510
+ "type": "string",
511
+ "enum": [
512
+ "markdown",
513
+ "json"
514
+ ]
515
+ },
516
+ "remote": {
517
+ "description": "Remote to push to. Defaults to the remote inferred from the current upstream tracking ref, or `origin` when `setUpstream` is true.",
518
+ "type": "string"
519
+ },
520
+ "branch": {
521
+ "description": "Branch to push. Defaults to the currently checked-out branch. Rejected when HEAD is detached.",
522
+ "type": "string"
523
+ },
524
+ "setUpstream": {
525
+ "default": false,
526
+ "description": "Set the upstream tracking reference (`git push -u`). Use when the branch has not been pushed yet. Remote defaults to `origin`.",
527
+ "type": "boolean"
528
+ }
529
+ },
530
+ "required": [
531
+ "allWorkspaceRoots",
532
+ "format",
533
+ "setUpstream"
534
+ ],
535
+ "additionalProperties": false
536
+ },
537
+ "git_merge": {
538
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
539
+ "type": "object",
540
+ "properties": {
541
+ "workspaceRoot": {
542
+ "description": "Highest-priority override.",
543
+ "type": "string"
544
+ },
545
+ "rootIndex": {
546
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
547
+ "type": "integer",
548
+ "minimum": 0,
549
+ "maximum": 9007199254740991
550
+ },
551
+ "allWorkspaceRoots": {
552
+ "default": false,
553
+ "description": "Fan out across all MCP file roots.",
554
+ "type": "boolean"
555
+ },
556
+ "format": {
557
+ "default": "markdown",
558
+ "type": "string",
559
+ "enum": [
560
+ "markdown",
561
+ "json"
562
+ ]
563
+ },
564
+ "sources": {
565
+ "minItems": 1,
566
+ "maxItems": 20,
567
+ "type": "array",
568
+ "items": {
569
+ "type": "string",
570
+ "minLength": 1
571
+ },
572
+ "description": "Branches to merge into the destination, in order."
573
+ },
574
+ "into": {
575
+ "description": "Destination branch. Defaults to the currently checked-out branch.",
576
+ "type": "string"
577
+ },
578
+ "strategy": {
579
+ "default": "auto",
580
+ "description": "`auto` (default): cascade fast-forward → rebase → merge-commit per source. `ff-only`: only fast-forward, fail if diverged. `rebase`: rebase source onto destination, then fast-forward (no merge-commit fallback). `merge`: always create a merge commit (no fast-forward).",
581
+ "type": "string",
582
+ "enum": [
583
+ "auto",
584
+ "ff-only",
585
+ "rebase",
586
+ "merge"
587
+ ]
588
+ },
589
+ "message": {
590
+ "description": "Merge commit message (used only when a merge commit is created).",
591
+ "type": "string"
592
+ },
593
+ "deleteMergedBranches": {
594
+ "default": false,
595
+ "description": "After all sources merge cleanly, delete each source branch locally (`git branch -d`). Protected names always skipped. Never affects remote branches.",
596
+ "type": "boolean"
597
+ },
598
+ "deleteMergedWorktrees": {
599
+ "default": false,
600
+ "description": "After all sources merge cleanly, remove any local worktree currently checked out on a source branch (`git worktree remove`). Protected tails always skipped.",
601
+ "type": "boolean"
602
+ }
603
+ },
604
+ "required": [
605
+ "allWorkspaceRoots",
606
+ "format",
607
+ "sources",
608
+ "strategy",
609
+ "deleteMergedBranches",
610
+ "deleteMergedWorktrees"
611
+ ],
612
+ "additionalProperties": false
613
+ },
614
+ "git_cherry_pick": {
615
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
616
+ "type": "object",
617
+ "properties": {
618
+ "workspaceRoot": {
619
+ "description": "Highest-priority override.",
620
+ "type": "string"
621
+ },
622
+ "rootIndex": {
623
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
624
+ "type": "integer",
625
+ "minimum": 0,
626
+ "maximum": 9007199254740991
627
+ },
628
+ "allWorkspaceRoots": {
629
+ "default": false,
630
+ "description": "Fan out across all MCP file roots.",
631
+ "type": "boolean"
632
+ },
633
+ "format": {
634
+ "default": "markdown",
635
+ "type": "string",
636
+ "enum": [
637
+ "markdown",
638
+ "json"
639
+ ]
640
+ },
641
+ "sources": {
642
+ "minItems": 1,
643
+ "maxItems": 50,
644
+ "type": "array",
645
+ "items": {
646
+ "type": "string",
647
+ "minLength": 1
648
+ },
649
+ "description": "Sources to cherry-pick: SHA, `A..B` range, or branch name. Branch sources resolve to `onto..<branch>` (only commits missing from destination)."
650
+ },
651
+ "onto": {
652
+ "description": "Destination branch. Defaults to the currently checked-out branch.",
653
+ "type": "string"
654
+ },
655
+ "deleteMergedBranches": {
656
+ "default": false,
657
+ "description": "After all commits apply, delete each branch-kind source locally (`git branch -d`) when it is fully merged into the destination. Protected names always skipped; never touches remote refs.",
658
+ "type": "boolean"
659
+ },
660
+ "deleteMergedWorktrees": {
661
+ "default": false,
662
+ "description": "After success, remove any local worktree attached to a branch-kind source (`git worktree remove`). Protected tails always skipped.",
663
+ "type": "boolean"
664
+ }
665
+ },
666
+ "required": [
667
+ "allWorkspaceRoots",
668
+ "format",
669
+ "sources",
670
+ "deleteMergedBranches",
671
+ "deleteMergedWorktrees"
672
+ ],
673
+ "additionalProperties": false
674
+ },
675
+ "git_reset_soft": {
676
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
677
+ "type": "object",
678
+ "properties": {
679
+ "workspaceRoot": {
680
+ "description": "Highest-priority override.",
681
+ "type": "string"
682
+ },
683
+ "rootIndex": {
684
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
685
+ "type": "integer",
686
+ "minimum": 0,
687
+ "maximum": 9007199254740991
688
+ },
689
+ "allWorkspaceRoots": {
690
+ "default": false,
691
+ "description": "Fan out across all MCP file roots.",
692
+ "type": "boolean"
693
+ },
694
+ "format": {
695
+ "default": "markdown",
696
+ "type": "string",
697
+ "enum": [
698
+ "markdown",
699
+ "json"
700
+ ]
701
+ },
702
+ "ref": {
703
+ "type": "string",
704
+ "minLength": 1,
705
+ "description": "Commit to reset to. Accepts ancestor notation (`HEAD~1`, `HEAD~3`), branch names, or full SHAs."
706
+ }
707
+ },
708
+ "required": [
709
+ "allWorkspaceRoots",
710
+ "format",
711
+ "ref"
712
+ ],
713
+ "additionalProperties": false
714
+ },
715
+ "git_worktree_add": {
716
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
717
+ "type": "object",
718
+ "properties": {
719
+ "workspaceRoot": {
720
+ "description": "Highest-priority override.",
721
+ "type": "string"
722
+ },
723
+ "rootIndex": {
724
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
725
+ "type": "integer",
726
+ "minimum": 0,
727
+ "maximum": 9007199254740991
728
+ },
729
+ "allWorkspaceRoots": {
730
+ "default": false,
731
+ "description": "Fan out across all MCP file roots.",
732
+ "type": "boolean"
733
+ },
734
+ "format": {
735
+ "default": "markdown",
736
+ "type": "string",
737
+ "enum": [
738
+ "markdown",
739
+ "json"
740
+ ]
741
+ },
742
+ "path": {
743
+ "type": "string",
744
+ "minLength": 1,
745
+ "description": "Filesystem path for the new worktree. Relative paths are resolved from the git toplevel."
746
+ },
747
+ "branch": {
748
+ "type": "string",
749
+ "minLength": 1,
750
+ "description": "Branch to check out in the new worktree. Created from `baseRef` if absent."
751
+ },
752
+ "baseRef": {
753
+ "description": "Commit-ish to base the new branch on when it does not yet exist. Default: HEAD.",
754
+ "type": "string"
755
+ }
756
+ },
757
+ "required": [
758
+ "allWorkspaceRoots",
759
+ "format",
760
+ "path",
761
+ "branch"
762
+ ],
763
+ "additionalProperties": false
764
+ },
765
+ "git_worktree_remove": {
766
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
767
+ "type": "object",
768
+ "properties": {
769
+ "workspaceRoot": {
770
+ "description": "Highest-priority override.",
771
+ "type": "string"
772
+ },
773
+ "rootIndex": {
774
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
775
+ "type": "integer",
776
+ "minimum": 0,
777
+ "maximum": 9007199254740991
778
+ },
779
+ "allWorkspaceRoots": {
780
+ "default": false,
781
+ "description": "Fan out across all MCP file roots.",
782
+ "type": "boolean"
783
+ },
784
+ "format": {
785
+ "default": "markdown",
786
+ "type": "string",
787
+ "enum": [
788
+ "markdown",
789
+ "json"
790
+ ]
791
+ },
792
+ "path": {
793
+ "type": "string",
794
+ "minLength": 1,
795
+ "description": "Path of the worktree to remove. Must not be the main worktree."
796
+ },
797
+ "force": {
798
+ "default": false,
799
+ "description": "Pass `--force` to allow removal of worktrees with uncommitted changes.",
800
+ "type": "boolean"
801
+ }
802
+ },
803
+ "required": [
804
+ "allWorkspaceRoots",
805
+ "format",
806
+ "path",
807
+ "force"
808
+ ],
809
+ "additionalProperties": false
810
+ }
811
+ }
812
+ }