@rethunk/mcp-multi-root-git 2.9.1 → 4.0.0
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 +23 -19
- package/CHANGELOG.md +145 -39
- package/HUMANS.md +23 -42
- package/README.md +30 -13
- package/dist/repo-paths.js +57 -13
- package/dist/server/batch-commit-tool.js +203 -53
- package/dist/server/error-codes.js +31 -16
- package/dist/server/git-blame-tool.js +66 -19
- package/dist/server/git-branch-tool.js +151 -0
- package/dist/server/git-cherry-pick-tool.js +221 -12
- package/dist/server/git-conflicts-tool.js +230 -0
- package/dist/server/git-diff-summary-tool.js +39 -28
- package/dist/server/git-diff-tool.js +56 -31
- package/dist/server/git-grep-tool.js +188 -0
- package/dist/server/git-inventory-tool.js +30 -10
- package/dist/server/git-log-tool.js +37 -6
- package/dist/server/git-merge-tool.js +71 -13
- package/dist/server/git-parity-tool.js +15 -6
- package/dist/server/git-push-tool.js +4 -2
- package/dist/server/git-refs.js +48 -17
- package/dist/server/git-reset-soft-tool.js +1 -1
- package/dist/server/git-revert-tool.js +160 -0
- package/dist/server/git-show-tool.js +5 -10
- package/dist/server/git-stash-tool.js +112 -78
- package/dist/server/git-status-tool.js +2 -2
- package/dist/server/git-tag-tool.js +8 -13
- package/dist/server/git-worktree-tool.js +67 -59
- package/dist/server/git.js +116 -24
- package/dist/server/inventory.js +90 -32
- package/dist/server/list-presets-tool.js +2 -8
- package/dist/server/presets-resource.js +37 -20
- package/dist/server/presets.js +87 -15
- package/dist/server/roots.js +52 -79
- package/dist/server/schemas.js +18 -19
- package/dist/server/test-harness.js +11 -4
- package/dist/server/tool-parameter-schemas.js +47 -58
- package/dist/server/tools.js +36 -17
- package/dist/server.js +1 -1
- package/docs/install.md +52 -5
- package/docs/mcp-tools.md +472 -284
- package/package.json +6 -6
- package/schemas/batch_commit.json +5 -17
- package/schemas/git_blame.json +13 -11
- package/schemas/git_branch.json +54 -0
- package/schemas/git_cherry_pick.json +13 -15
- package/schemas/git_cherry_pick_continue.json +34 -0
- package/schemas/git_conflicts.json +38 -0
- package/schemas/git_diff.json +12 -10
- package/schemas/git_diff_summary.json +1 -15
- package/schemas/git_grep.json +85 -0
- package/schemas/git_inventory.json +32 -23
- package/schemas/git_log.json +20 -24
- package/schemas/git_merge.json +3 -15
- package/schemas/git_parity.json +13 -23
- package/schemas/git_push.json +1 -13
- package/schemas/git_reset_soft.json +1 -13
- package/schemas/git_revert.json +47 -0
- package/schemas/git_show.json +2 -8
- package/schemas/git_stash_apply.json +2 -8
- package/schemas/git_stash_push.json +47 -0
- package/schemas/git_status.json +13 -23
- package/schemas/git_tag.json +1 -7
- package/schemas/git_worktree_add.json +2 -14
- package/schemas/git_worktree_remove.json +2 -14
- package/schemas/index.json +28 -23
- package/schemas/list_presets.json +13 -23
- package/tool-parameters.schema.json +407 -423
- package/dist/server/git-branch-list-tool.js +0 -138
- package/dist/server/git-fetch-tool.js +0 -266
- package/dist/server/git-reflog-tool.js +0 -126
- package/schemas/git_branch_list.json +0 -36
- package/schemas/git_fetch.json +0 -52
- package/schemas/git_reflog.json +0 -44
- package/schemas/git_stash_list.json +0 -30
- package/schemas/git_worktree_list.json +0 -30
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rethunk/mcp-multi-root-git",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
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,
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"lint": "biome check .",
|
|
45
45
|
"format": "biome check --write .",
|
|
46
46
|
"typecheck": "tsc --noEmit",
|
|
47
|
-
"ci": "bun run schema:tools:check && bun run lint && bun run typecheck && bun run test && bun run build"
|
|
47
|
+
"ci": "bun run schema:tools:check && bun run schema:individual:check && bun run lint && bun run typecheck && set -o pipefail && bun run test:coverage 2>&1 | tee .coverage-ci.txt && bun run coverage:check .coverage-ci.txt 80 && bun run build"
|
|
48
48
|
},
|
|
49
49
|
"keywords": [
|
|
50
50
|
"mcp",
|
|
@@ -67,15 +67,15 @@
|
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"fastmcp": "^4.
|
|
70
|
+
"fastmcp": "^4.7.2",
|
|
71
71
|
"zod": "^4.4.3"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@biomejs/biome": "^2.4
|
|
74
|
+
"@biomejs/biome": "^2.5.4",
|
|
75
75
|
"@types/bun": "^1.3.14",
|
|
76
|
-
"@types/node": "^
|
|
76
|
+
"@types/node": "^26.1.1",
|
|
77
77
|
"rimraf": "^6.1.3",
|
|
78
|
-
"typescript": "^
|
|
78
|
+
"typescript": "^7.0.2"
|
|
79
79
|
},
|
|
80
80
|
"overrides": {
|
|
81
81
|
"@hono/node-server": "^1.19.14",
|
|
@@ -5,20 +5,9 @@
|
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
7
|
"workspaceRoot": {
|
|
8
|
-
"description": "
|
|
8
|
+
"description": "Repo path. Default: first MCP root / cwd.",
|
|
9
9
|
"type": "string"
|
|
10
10
|
},
|
|
11
|
-
"rootIndex": {
|
|
12
|
-
"description": "0-based index into MCP roots; ignored if workspaceRoot set.",
|
|
13
|
-
"type": "integer",
|
|
14
|
-
"minimum": 0,
|
|
15
|
-
"maximum": 9007199254740991
|
|
16
|
-
},
|
|
17
|
-
"allWorkspaceRoots": {
|
|
18
|
-
"default": false,
|
|
19
|
-
"description": "Fan out across all MCP roots.",
|
|
20
|
-
"type": "boolean"
|
|
21
|
-
},
|
|
22
11
|
"format": {
|
|
23
12
|
"default": "markdown",
|
|
24
13
|
"type": "string",
|
|
@@ -62,13 +51,13 @@
|
|
|
62
51
|
"from": {
|
|
63
52
|
"type": "integer",
|
|
64
53
|
"minimum": 1,
|
|
65
|
-
"maximum":
|
|
54
|
+
"maximum": 1000000,
|
|
66
55
|
"description": "Start line number (1-indexed)."
|
|
67
56
|
},
|
|
68
57
|
"to": {
|
|
69
58
|
"type": "integer",
|
|
70
59
|
"minimum": 1,
|
|
71
|
-
"maximum":
|
|
60
|
+
"maximum": 1000000,
|
|
72
61
|
"description": "End line number (1-indexed, inclusive)."
|
|
73
62
|
}
|
|
74
63
|
},
|
|
@@ -88,7 +77,7 @@
|
|
|
88
77
|
}
|
|
89
78
|
]
|
|
90
79
|
},
|
|
91
|
-
"description": "Paths to stage, relative to git root. String or `{ path, lines }` for hunk-level staging. Deleted tracked files are staged via `git rm --cached`. Cannot combine `lines` with a deleted file."
|
|
80
|
+
"description": "Paths to stage, relative to git root. String or `{ path, lines }` for hunk-level staging. Each path is staged individually (`git add` / `git apply --cached` / `git rm --cached`); on mid-entry stage failure, already-staged paths for that entry are unstaged. Deleted tracked files are staged via `git rm --cached`. Cannot combine `lines` with a deleted file. Rejects `.`, the repo root, and directory pathspecs."
|
|
92
81
|
}
|
|
93
82
|
},
|
|
94
83
|
"required": [
|
|
@@ -110,12 +99,11 @@
|
|
|
110
99
|
},
|
|
111
100
|
"dryRun": {
|
|
112
101
|
"default": false,
|
|
113
|
-
"description": "Stage files and return a preview without writing commits;
|
|
102
|
+
"description": "Stage files and return a preview without writing commits; restores the index afterwards. Response is marked DRY RUN.",
|
|
114
103
|
"type": "boolean"
|
|
115
104
|
}
|
|
116
105
|
},
|
|
117
106
|
"required": [
|
|
118
|
-
"allWorkspaceRoots",
|
|
119
107
|
"format",
|
|
120
108
|
"commits",
|
|
121
109
|
"push",
|
package/schemas/git_blame.json
CHANGED
|
@@ -5,15 +5,9 @@
|
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
7
|
"workspaceRoot": {
|
|
8
|
-
"description": "
|
|
8
|
+
"description": "Repo path. Default: first MCP root / cwd.",
|
|
9
9
|
"type": "string"
|
|
10
10
|
},
|
|
11
|
-
"rootIndex": {
|
|
12
|
-
"description": "0-based index into MCP roots; ignored if workspaceRoot set.",
|
|
13
|
-
"type": "integer",
|
|
14
|
-
"minimum": 0,
|
|
15
|
-
"maximum": 9007199254740991
|
|
16
|
-
},
|
|
17
11
|
"format": {
|
|
18
12
|
"default": "markdown",
|
|
19
13
|
"type": "string",
|
|
@@ -28,25 +22,33 @@
|
|
|
28
22
|
"description": "Repo-relative path to the file to blame."
|
|
29
23
|
},
|
|
30
24
|
"ref": {
|
|
31
|
-
"description": "Optional commit-ish (SHA, branch, tag) to blame at.",
|
|
25
|
+
"description": "Optional commit-ish (SHA, branch, tag) to blame at. Ancestor notation is accepted (e.g. \"HEAD~3\", \"main^2\").",
|
|
32
26
|
"type": "string"
|
|
33
27
|
},
|
|
34
28
|
"startLine": {
|
|
35
29
|
"description": "First line of the range to blame (1-based). Requires endLine.",
|
|
36
30
|
"type": "integer",
|
|
37
31
|
"minimum": 1,
|
|
38
|
-
"maximum":
|
|
32
|
+
"maximum": 1000000
|
|
39
33
|
},
|
|
40
34
|
"endLine": {
|
|
41
35
|
"description": "Last line of the range to blame (1-based, inclusive). Requires startLine.",
|
|
42
36
|
"type": "integer",
|
|
43
37
|
"minimum": 1,
|
|
44
|
-
"maximum":
|
|
38
|
+
"maximum": 1000000
|
|
39
|
+
},
|
|
40
|
+
"maxLines": {
|
|
41
|
+
"default": 2000,
|
|
42
|
+
"description": "Max blamed lines to return. Default: 2000.",
|
|
43
|
+
"type": "integer",
|
|
44
|
+
"minimum": 1,
|
|
45
|
+
"maximum": 10000
|
|
45
46
|
}
|
|
46
47
|
},
|
|
47
48
|
"required": [
|
|
48
49
|
"format",
|
|
49
|
-
"path"
|
|
50
|
+
"path",
|
|
51
|
+
"maxLines"
|
|
50
52
|
],
|
|
51
53
|
"additionalProperties": false
|
|
52
54
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "@rethunk/mcp-multi-root-git: git_branch",
|
|
4
|
+
"description": "Parameter schema for the 'git_branch' MCP tool.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"workspaceRoot": {
|
|
8
|
+
"description": "Repo path. Default: first MCP root / cwd.",
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"format": {
|
|
12
|
+
"default": "markdown",
|
|
13
|
+
"type": "string",
|
|
14
|
+
"enum": [
|
|
15
|
+
"markdown",
|
|
16
|
+
"json"
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"action": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"enum": [
|
|
22
|
+
"create",
|
|
23
|
+
"delete",
|
|
24
|
+
"rename"
|
|
25
|
+
],
|
|
26
|
+
"description": "Which branch operation to perform."
|
|
27
|
+
},
|
|
28
|
+
"name": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"minLength": 1,
|
|
31
|
+
"description": "Branch name to create/delete, or the existing branch name for rename."
|
|
32
|
+
},
|
|
33
|
+
"from": {
|
|
34
|
+
"description": "Commit-ish to base a new branch on (create only). Default: HEAD.",
|
|
35
|
+
"type": "string"
|
|
36
|
+
},
|
|
37
|
+
"newName": {
|
|
38
|
+
"description": "New branch name (required for rename).",
|
|
39
|
+
"type": "string"
|
|
40
|
+
},
|
|
41
|
+
"force": {
|
|
42
|
+
"default": false,
|
|
43
|
+
"description": "Force-delete an unmerged branch (`git branch -D`). Delete only; never overrides protected-branch rejection.",
|
|
44
|
+
"type": "boolean"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"required": [
|
|
48
|
+
"format",
|
|
49
|
+
"action",
|
|
50
|
+
"name",
|
|
51
|
+
"force"
|
|
52
|
+
],
|
|
53
|
+
"additionalProperties": false
|
|
54
|
+
}
|
|
@@ -5,20 +5,9 @@
|
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
7
|
"workspaceRoot": {
|
|
8
|
-
"description": "
|
|
8
|
+
"description": "Repo path. Default: first MCP root / cwd.",
|
|
9
9
|
"type": "string"
|
|
10
10
|
},
|
|
11
|
-
"rootIndex": {
|
|
12
|
-
"description": "0-based index into MCP roots; ignored if workspaceRoot set.",
|
|
13
|
-
"type": "integer",
|
|
14
|
-
"minimum": 0,
|
|
15
|
-
"maximum": 9007199254740991
|
|
16
|
-
},
|
|
17
|
-
"allWorkspaceRoots": {
|
|
18
|
-
"default": false,
|
|
19
|
-
"description": "Fan out across all MCP roots.",
|
|
20
|
-
"type": "boolean"
|
|
21
|
-
},
|
|
22
11
|
"format": {
|
|
23
12
|
"default": "markdown",
|
|
24
13
|
"type": "string",
|
|
@@ -48,22 +37,31 @@
|
|
|
48
37
|
},
|
|
49
38
|
"deleteMergedWorktrees": {
|
|
50
39
|
"default": false,
|
|
51
|
-
"description": "Remove local worktrees on branch-kind sources after success. Protected tails skipped.",
|
|
40
|
+
"description": "Remove local worktrees on branch-kind sources after success. Protected names and path tails skipped.",
|
|
52
41
|
"type": "boolean"
|
|
53
42
|
},
|
|
54
43
|
"strictMergedRefEquality": {
|
|
55
44
|
"default": false,
|
|
56
45
|
"description": "false (default): delete branch when every commit is content-equivalent on destination (patch-id, normal cherry-pick outcome). true: require strict ref ancestry (`git branch -d` semantics — will refuse after cherry-pick due to SHA mismatch).",
|
|
57
46
|
"type": "boolean"
|
|
47
|
+
},
|
|
48
|
+
"onConflict": {
|
|
49
|
+
"default": "abort",
|
|
50
|
+
"description": "`abort` (default): on conflict, run `cherry-pick --abort` and roll back the whole range (unchanged behavior). `pause`: on conflict, leave the conflict and native cherry-pick sequencer state in place — commits already applied stay applied — so it can be resolved and resumed via `git_cherry_pick_continue`.",
|
|
51
|
+
"type": "string",
|
|
52
|
+
"enum": [
|
|
53
|
+
"abort",
|
|
54
|
+
"pause"
|
|
55
|
+
]
|
|
58
56
|
}
|
|
59
57
|
},
|
|
60
58
|
"required": [
|
|
61
|
-
"allWorkspaceRoots",
|
|
62
59
|
"format",
|
|
63
60
|
"sources",
|
|
64
61
|
"deleteMergedBranches",
|
|
65
62
|
"deleteMergedWorktrees",
|
|
66
|
-
"strictMergedRefEquality"
|
|
63
|
+
"strictMergedRefEquality",
|
|
64
|
+
"onConflict"
|
|
67
65
|
],
|
|
68
66
|
"additionalProperties": false
|
|
69
67
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "@rethunk/mcp-multi-root-git: git_cherry_pick_continue",
|
|
4
|
+
"description": "Parameter schema for the 'git_cherry_pick_continue' MCP tool.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"workspaceRoot": {
|
|
8
|
+
"description": "Repo path. Default: first MCP root / cwd.",
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"format": {
|
|
12
|
+
"default": "markdown",
|
|
13
|
+
"type": "string",
|
|
14
|
+
"enum": [
|
|
15
|
+
"markdown",
|
|
16
|
+
"json"
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"action": {
|
|
20
|
+
"default": "continue",
|
|
21
|
+
"description": "\"continue\" (default): resolve conflicts, stage them, then resume the sequencer. \"abort\": roll back to the pre-cherry-pick HEAD.",
|
|
22
|
+
"type": "string",
|
|
23
|
+
"enum": [
|
|
24
|
+
"continue",
|
|
25
|
+
"abort"
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"required": [
|
|
30
|
+
"format",
|
|
31
|
+
"action"
|
|
32
|
+
],
|
|
33
|
+
"additionalProperties": false
|
|
34
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "@rethunk/mcp-multi-root-git: git_conflicts",
|
|
4
|
+
"description": "Parameter schema for the 'git_conflicts' MCP tool.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"workspaceRoot": {
|
|
8
|
+
"description": "Repo path. Default: first MCP root / cwd.",
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"format": {
|
|
12
|
+
"default": "markdown",
|
|
13
|
+
"type": "string",
|
|
14
|
+
"enum": [
|
|
15
|
+
"markdown",
|
|
16
|
+
"json"
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"withHunks": {
|
|
20
|
+
"default": true,
|
|
21
|
+
"description": "Parse conflict-marker hunks per file. Set false for just the path list.",
|
|
22
|
+
"type": "boolean"
|
|
23
|
+
},
|
|
24
|
+
"maxLinesPerFile": {
|
|
25
|
+
"default": 200,
|
|
26
|
+
"description": "Cap on lines scanned per file before marking `truncated: true`.",
|
|
27
|
+
"type": "integer",
|
|
28
|
+
"minimum": 1,
|
|
29
|
+
"maximum": 2000
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"required": [
|
|
33
|
+
"format",
|
|
34
|
+
"withHunks",
|
|
35
|
+
"maxLinesPerFile"
|
|
36
|
+
],
|
|
37
|
+
"additionalProperties": false
|
|
38
|
+
}
|
package/schemas/git_diff.json
CHANGED
|
@@ -5,15 +5,9 @@
|
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
7
|
"workspaceRoot": {
|
|
8
|
-
"description": "
|
|
8
|
+
"description": "Repo path. Default: first MCP root / cwd.",
|
|
9
9
|
"type": "string"
|
|
10
10
|
},
|
|
11
|
-
"rootIndex": {
|
|
12
|
-
"description": "0-based index into MCP roots; ignored if workspaceRoot set.",
|
|
13
|
-
"type": "integer",
|
|
14
|
-
"minimum": 0,
|
|
15
|
-
"maximum": 9007199254740991
|
|
16
|
-
},
|
|
17
11
|
"format": {
|
|
18
12
|
"default": "markdown",
|
|
19
13
|
"type": "string",
|
|
@@ -23,11 +17,11 @@
|
|
|
23
17
|
]
|
|
24
18
|
},
|
|
25
19
|
"base": {
|
|
26
|
-
"description": "Base ref (e.g. \"main\"
|
|
20
|
+
"description": "Base ref (e.g. \"main\"). Ancestor notation is accepted (e.g. \"HEAD~3\", \"main^2\"). Omit for unstaged changes.",
|
|
27
21
|
"type": "string"
|
|
28
22
|
},
|
|
29
23
|
"head": {
|
|
30
|
-
"description": "Head ref (e.g. \"feature-branch\"). Defaults to HEAD. Used only when `base` is set.",
|
|
24
|
+
"description": "Head ref (e.g. \"feature-branch\"). Ancestor notation is accepted (e.g. \"HEAD~3\", \"main^2\"). Defaults to HEAD. Used only when `base` is set.",
|
|
31
25
|
"type": "string"
|
|
32
26
|
},
|
|
33
27
|
"path": {
|
|
@@ -51,11 +45,19 @@
|
|
|
51
45
|
"type": "integer",
|
|
52
46
|
"minimum": 0,
|
|
53
47
|
"maximum": 100
|
|
48
|
+
},
|
|
49
|
+
"maxBytes": {
|
|
50
|
+
"default": 512000,
|
|
51
|
+
"description": "Max UTF-8 bytes of diff text to return (default 512000). Oversized output is truncated with truncated:true.",
|
|
52
|
+
"type": "integer",
|
|
53
|
+
"minimum": 1024,
|
|
54
|
+
"maximum": 10000000
|
|
54
55
|
}
|
|
55
56
|
},
|
|
56
57
|
"required": [
|
|
57
58
|
"format",
|
|
58
|
-
"staged"
|
|
59
|
+
"staged",
|
|
60
|
+
"maxBytes"
|
|
59
61
|
],
|
|
60
62
|
"additionalProperties": false
|
|
61
63
|
}
|
|
@@ -5,23 +5,9 @@
|
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
7
|
"workspaceRoot": {
|
|
8
|
-
"description": "
|
|
8
|
+
"description": "Repo path. Default: first MCP root / cwd.",
|
|
9
9
|
"type": "string"
|
|
10
10
|
},
|
|
11
|
-
"rootIndex": {
|
|
12
|
-
"description": "0-based index into MCP roots; ignored if workspaceRoot set.",
|
|
13
|
-
"type": "integer",
|
|
14
|
-
"minimum": 0,
|
|
15
|
-
"maximum": 9007199254740991
|
|
16
|
-
},
|
|
17
|
-
"absoluteGitRoots": {
|
|
18
|
-
"description": "Absolute paths to git repo roots; use for sibling clones under a non-git parent.",
|
|
19
|
-
"maxItems": 256,
|
|
20
|
-
"type": "array",
|
|
21
|
-
"items": {
|
|
22
|
-
"type": "string"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
11
|
"format": {
|
|
26
12
|
"default": "markdown",
|
|
27
13
|
"type": "string",
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "@rethunk/mcp-multi-root-git: git_grep",
|
|
4
|
+
"description": "Parameter schema for the 'git_grep' MCP tool.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"root": {
|
|
8
|
+
"description": "Repo path, array of paths, or \"*\" for all MCP roots.",
|
|
9
|
+
"anyOf": [
|
|
10
|
+
{
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "string"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"format": {
|
|
22
|
+
"default": "markdown",
|
|
23
|
+
"type": "string",
|
|
24
|
+
"enum": [
|
|
25
|
+
"markdown",
|
|
26
|
+
"json"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"pickaxe": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"properties": {
|
|
32
|
+
"mode": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"enum": [
|
|
35
|
+
"S",
|
|
36
|
+
"G"
|
|
37
|
+
],
|
|
38
|
+
"description": "`S` = pickaxe string (`git log -S`); `G` = pickaxe regex (`git log -G`)."
|
|
39
|
+
},
|
|
40
|
+
"term": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"minLength": 1,
|
|
43
|
+
"maxLength": 500,
|
|
44
|
+
"description": "Search term / regex for pickaxe history."
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"required": [
|
|
48
|
+
"mode",
|
|
49
|
+
"term"
|
|
50
|
+
],
|
|
51
|
+
"additionalProperties": false,
|
|
52
|
+
"description": "Pickaxe history search. Returns `commits[]` (sha + subject) per root."
|
|
53
|
+
},
|
|
54
|
+
"ref": {
|
|
55
|
+
"description": "Commit/branch/tag to use as the history tip. Must be a safe ref token.",
|
|
56
|
+
"type": "string"
|
|
57
|
+
},
|
|
58
|
+
"paths": {
|
|
59
|
+
"description": "Limit history to these paths (must resolve within the repo root).",
|
|
60
|
+
"type": "array",
|
|
61
|
+
"items": {
|
|
62
|
+
"type": "string"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"ignoreCase": {
|
|
66
|
+
"default": false,
|
|
67
|
+
"description": "Case-insensitive match (`-i`; affects `G` mode regexes).",
|
|
68
|
+
"type": "boolean"
|
|
69
|
+
},
|
|
70
|
+
"maxMatches": {
|
|
71
|
+
"default": 200,
|
|
72
|
+
"description": "Max commits per root (hard cap 1000, default 200).",
|
|
73
|
+
"type": "integer",
|
|
74
|
+
"minimum": 1,
|
|
75
|
+
"maximum": 1000
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"required": [
|
|
79
|
+
"format",
|
|
80
|
+
"pickaxe",
|
|
81
|
+
"ignoreCase",
|
|
82
|
+
"maxMatches"
|
|
83
|
+
],
|
|
84
|
+
"additionalProperties": false
|
|
85
|
+
}
|
|
@@ -4,28 +4,19 @@
|
|
|
4
4
|
"description": "Parameter schema for the 'git_inventory' MCP tool.",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
|
-
"
|
|
8
|
-
"description": "
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"type": "boolean"
|
|
21
|
-
},
|
|
22
|
-
"absoluteGitRoots": {
|
|
23
|
-
"description": "Absolute paths to git repo roots; use for sibling clones under a non-git parent.",
|
|
24
|
-
"maxItems": 256,
|
|
25
|
-
"type": "array",
|
|
26
|
-
"items": {
|
|
27
|
-
"type": "string"
|
|
28
|
-
}
|
|
7
|
+
"root": {
|
|
8
|
+
"description": "Repo path, array of paths, or \"*\" for all MCP roots.",
|
|
9
|
+
"anyOf": [
|
|
10
|
+
{
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "string"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
]
|
|
29
20
|
},
|
|
30
21
|
"format": {
|
|
31
22
|
"default": "markdown",
|
|
@@ -57,6 +48,25 @@
|
|
|
57
48
|
"description": "Pair with `remote`.",
|
|
58
49
|
"type": "string"
|
|
59
50
|
},
|
|
51
|
+
"compareRefs": {
|
|
52
|
+
"description": "Ahead/behind between two local refs (e.g. main vs a feature branch), independent of upstream tracking.",
|
|
53
|
+
"type": "object",
|
|
54
|
+
"properties": {
|
|
55
|
+
"left": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"description": "Base ref (ahead = commits in right not in left)."
|
|
58
|
+
},
|
|
59
|
+
"right": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"description": "Other ref (behind = commits in left not in right)."
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"required": [
|
|
65
|
+
"left",
|
|
66
|
+
"right"
|
|
67
|
+
],
|
|
68
|
+
"additionalProperties": false
|
|
69
|
+
},
|
|
60
70
|
"maxRoots": {
|
|
61
71
|
"default": 64,
|
|
62
72
|
"type": "integer",
|
|
@@ -65,7 +75,6 @@
|
|
|
65
75
|
}
|
|
66
76
|
},
|
|
67
77
|
"required": [
|
|
68
|
-
"allWorkspaceRoots",
|
|
69
78
|
"format",
|
|
70
79
|
"presetMerge",
|
|
71
80
|
"maxRoots"
|
package/schemas/git_log.json
CHANGED
|
@@ -4,28 +4,19 @@
|
|
|
4
4
|
"description": "Parameter schema for the 'git_log' MCP tool.",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
|
-
"
|
|
8
|
-
"description": "
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"type": "boolean"
|
|
21
|
-
},
|
|
22
|
-
"absoluteGitRoots": {
|
|
23
|
-
"description": "Absolute paths to git repo roots; use for sibling clones under a non-git parent.",
|
|
24
|
-
"maxItems": 256,
|
|
25
|
-
"type": "array",
|
|
26
|
-
"items": {
|
|
27
|
-
"type": "string"
|
|
28
|
-
}
|
|
7
|
+
"root": {
|
|
8
|
+
"description": "Repo path, array of paths, or \"*\" for all MCP roots.",
|
|
9
|
+
"anyOf": [
|
|
10
|
+
{
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "string"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
]
|
|
29
20
|
},
|
|
30
21
|
"format": {
|
|
31
22
|
"default": "markdown",
|
|
@@ -66,12 +57,17 @@
|
|
|
66
57
|
"branch": {
|
|
67
58
|
"description": "Ref/branch to log from. Default: HEAD.",
|
|
68
59
|
"type": "string"
|
|
60
|
+
},
|
|
61
|
+
"follow": {
|
|
62
|
+
"default": false,
|
|
63
|
+
"description": "Pass `git log --follow` for rename-aware history. Requires exactly one entry in `paths`.",
|
|
64
|
+
"type": "boolean"
|
|
69
65
|
}
|
|
70
66
|
},
|
|
71
67
|
"required": [
|
|
72
|
-
"allWorkspaceRoots",
|
|
73
68
|
"format",
|
|
74
|
-
"maxCommits"
|
|
69
|
+
"maxCommits",
|
|
70
|
+
"follow"
|
|
75
71
|
],
|
|
76
72
|
"additionalProperties": false
|
|
77
73
|
}
|