@rethunk/mcp-multi-root-git 2.3.3 → 2.4.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.
Files changed (42) hide show
  1. package/AGENTS.md +30 -3
  2. package/CHANGELOG.md +61 -0
  3. package/HUMANS.md +106 -2
  4. package/README.md +15 -1
  5. package/dist/server/batch-commit-tool.js +244 -19
  6. package/dist/server/coverage.js +22 -0
  7. package/dist/server/git-diff-tool.js +132 -0
  8. package/dist/server/git-fetch-tool.js +131 -0
  9. package/dist/server/git-push-tool.js +8 -1
  10. package/dist/server/git-show-tool.js +148 -0
  11. package/dist/server/git-stash-tool.js +131 -0
  12. package/dist/server/git-tag-tool.js +162 -0
  13. package/dist/server/git.js +18 -2
  14. package/dist/server/roots.js +8 -4
  15. package/dist/server/test-harness.js +77 -6
  16. package/dist/server/tool-parameter-schemas.js +94 -0
  17. package/dist/server/tools.js +11 -0
  18. package/docs/install.md +19 -2
  19. package/docs/mcp-tools.md +235 -5
  20. package/package.json +15 -8
  21. package/schemas/batch_commit.json +125 -0
  22. package/schemas/git_cherry_pick.json +63 -0
  23. package/schemas/git_diff.json +62 -0
  24. package/schemas/git_diff_summary.json +75 -0
  25. package/schemas/git_fetch.json +52 -0
  26. package/schemas/git_inventory.json +74 -0
  27. package/schemas/git_log.json +75 -0
  28. package/schemas/git_merge.json +79 -0
  29. package/schemas/git_parity.json +74 -0
  30. package/schemas/git_push.json +50 -0
  31. package/schemas/git_reset_soft.json +42 -0
  32. package/schemas/git_show.json +39 -0
  33. package/schemas/git_stash_apply.json +44 -0
  34. package/schemas/git_stash_list.json +30 -0
  35. package/schemas/git_status.json +49 -0
  36. package/schemas/git_tag.json +50 -0
  37. package/schemas/git_worktree_add.json +52 -0
  38. package/schemas/git_worktree_list.json +30 -0
  39. package/schemas/git_worktree_remove.json +48 -0
  40. package/schemas/index.json +108 -0
  41. package/schemas/list_presets.json +44 -0
  42. package/tool-parameters.schema.json +1125 -0
@@ -0,0 +1,50 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "@rethunk/mcp-multi-root-git: git_push",
4
+ "description": "Parameter schema for the 'git_push' MCP tool.",
5
+ "type": "object",
6
+ "properties": {
7
+ "workspaceRoot": {
8
+ "description": "Highest-priority override.",
9
+ "type": "string"
10
+ },
11
+ "rootIndex": {
12
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
13
+ "type": "integer",
14
+ "minimum": 0,
15
+ "maximum": 9007199254740991
16
+ },
17
+ "allWorkspaceRoots": {
18
+ "default": false,
19
+ "description": "Fan out across all MCP file roots.",
20
+ "type": "boolean"
21
+ },
22
+ "format": {
23
+ "default": "markdown",
24
+ "type": "string",
25
+ "enum": [
26
+ "markdown",
27
+ "json"
28
+ ]
29
+ },
30
+ "remote": {
31
+ "description": "Remote to push to. Defaults to the remote inferred from the current upstream tracking ref, or `origin` when `setUpstream` is true.",
32
+ "type": "string"
33
+ },
34
+ "branch": {
35
+ "description": "Branch to push. Defaults to the currently checked-out branch. Rejected when HEAD is detached.",
36
+ "type": "string"
37
+ },
38
+ "setUpstream": {
39
+ "default": false,
40
+ "description": "Set the upstream tracking reference (`git push -u`). Use when the branch has not been pushed yet. Remote defaults to `origin`.",
41
+ "type": "boolean"
42
+ }
43
+ },
44
+ "required": [
45
+ "allWorkspaceRoots",
46
+ "format",
47
+ "setUpstream"
48
+ ],
49
+ "additionalProperties": false
50
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "@rethunk/mcp-multi-root-git: git_reset_soft",
4
+ "description": "Parameter schema for the 'git_reset_soft' MCP tool.",
5
+ "type": "object",
6
+ "properties": {
7
+ "workspaceRoot": {
8
+ "description": "Highest-priority override.",
9
+ "type": "string"
10
+ },
11
+ "rootIndex": {
12
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
13
+ "type": "integer",
14
+ "minimum": 0,
15
+ "maximum": 9007199254740991
16
+ },
17
+ "allWorkspaceRoots": {
18
+ "default": false,
19
+ "description": "Fan out across all MCP file roots.",
20
+ "type": "boolean"
21
+ },
22
+ "format": {
23
+ "default": "markdown",
24
+ "type": "string",
25
+ "enum": [
26
+ "markdown",
27
+ "json"
28
+ ]
29
+ },
30
+ "ref": {
31
+ "type": "string",
32
+ "minLength": 1,
33
+ "description": "Commit to reset to. Accepts ancestor notation (`HEAD~1`, `HEAD~3`), branch names, or full SHAs."
34
+ }
35
+ },
36
+ "required": [
37
+ "allWorkspaceRoots",
38
+ "format",
39
+ "ref"
40
+ ],
41
+ "additionalProperties": false
42
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "@rethunk/mcp-multi-root-git: git_show",
4
+ "description": "Parameter schema for the 'git_show' MCP tool.",
5
+ "type": "object",
6
+ "properties": {
7
+ "workspaceRoot": {
8
+ "description": "Highest-priority override.",
9
+ "type": "string"
10
+ },
11
+ "rootIndex": {
12
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
13
+ "type": "integer",
14
+ "minimum": 0,
15
+ "maximum": 9007199254740991
16
+ },
17
+ "format": {
18
+ "default": "markdown",
19
+ "type": "string",
20
+ "enum": [
21
+ "markdown",
22
+ "json"
23
+ ]
24
+ },
25
+ "ref": {
26
+ "type": "string",
27
+ "description": "Commit reference (SHA, branch, tag, or any git rev-spec)."
28
+ },
29
+ "path": {
30
+ "description": "Optional file path to inspect at the ref. If provided, shows that path's content at the ref instead of the diff.",
31
+ "type": "string"
32
+ }
33
+ },
34
+ "required": [
35
+ "format",
36
+ "ref"
37
+ ],
38
+ "additionalProperties": false
39
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "@rethunk/mcp-multi-root-git: git_stash_apply",
4
+ "description": "Parameter schema for the 'git_stash_apply' MCP tool.",
5
+ "type": "object",
6
+ "properties": {
7
+ "workspaceRoot": {
8
+ "description": "Highest-priority override.",
9
+ "type": "string"
10
+ },
11
+ "rootIndex": {
12
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
13
+ "type": "integer",
14
+ "minimum": 0,
15
+ "maximum": 9007199254740991
16
+ },
17
+ "format": {
18
+ "default": "markdown",
19
+ "type": "string",
20
+ "enum": [
21
+ "markdown",
22
+ "json"
23
+ ]
24
+ },
25
+ "index": {
26
+ "default": 0,
27
+ "description": "Stash index (defaults to 0 for stash@{0}).",
28
+ "type": "integer",
29
+ "minimum": 0,
30
+ "maximum": 9007199254740991
31
+ },
32
+ "pop": {
33
+ "default": false,
34
+ "description": "If true, runs `git stash pop` instead of `git stash apply` (removes stash after applying).",
35
+ "type": "boolean"
36
+ }
37
+ },
38
+ "required": [
39
+ "format",
40
+ "index",
41
+ "pop"
42
+ ],
43
+ "additionalProperties": false
44
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "@rethunk/mcp-multi-root-git: git_stash_list",
4
+ "description": "Parameter schema for the 'git_stash_list' MCP tool.",
5
+ "type": "object",
6
+ "properties": {
7
+ "workspaceRoot": {
8
+ "description": "Highest-priority override.",
9
+ "type": "string"
10
+ },
11
+ "rootIndex": {
12
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
13
+ "type": "integer",
14
+ "minimum": 0,
15
+ "maximum": 9007199254740991
16
+ },
17
+ "format": {
18
+ "default": "markdown",
19
+ "type": "string",
20
+ "enum": [
21
+ "markdown",
22
+ "json"
23
+ ]
24
+ }
25
+ },
26
+ "required": [
27
+ "format"
28
+ ],
29
+ "additionalProperties": false
30
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "@rethunk/mcp-multi-root-git: git_status",
4
+ "description": "Parameter schema for the 'git_status' MCP tool.",
5
+ "type": "object",
6
+ "properties": {
7
+ "workspaceRoot": {
8
+ "description": "Highest-priority override.",
9
+ "type": "string"
10
+ },
11
+ "rootIndex": {
12
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
13
+ "type": "integer",
14
+ "minimum": 0,
15
+ "maximum": 9007199254740991
16
+ },
17
+ "allWorkspaceRoots": {
18
+ "default": false,
19
+ "description": "Fan out across all MCP file roots.",
20
+ "type": "boolean"
21
+ },
22
+ "absoluteGitRoots": {
23
+ "description": "Absolute paths to git repo roots. Use for many sibling clones under a non-git parent directory.",
24
+ "maxItems": 256,
25
+ "type": "array",
26
+ "items": {
27
+ "type": "string"
28
+ }
29
+ },
30
+ "format": {
31
+ "default": "markdown",
32
+ "type": "string",
33
+ "enum": [
34
+ "markdown",
35
+ "json"
36
+ ]
37
+ },
38
+ "includeSubmodules": {
39
+ "default": true,
40
+ "type": "boolean"
41
+ }
42
+ },
43
+ "required": [
44
+ "allWorkspaceRoots",
45
+ "format",
46
+ "includeSubmodules"
47
+ ],
48
+ "additionalProperties": false
49
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "@rethunk/mcp-multi-root-git: git_tag",
4
+ "description": "Parameter schema for the 'git_tag' MCP tool.",
5
+ "type": "object",
6
+ "properties": {
7
+ "workspaceRoot": {
8
+ "description": "Highest-priority override.",
9
+ "type": "string"
10
+ },
11
+ "rootIndex": {
12
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
13
+ "type": "integer",
14
+ "minimum": 0,
15
+ "maximum": 9007199254740991
16
+ },
17
+ "format": {
18
+ "default": "markdown",
19
+ "type": "string",
20
+ "enum": [
21
+ "markdown",
22
+ "json"
23
+ ]
24
+ },
25
+ "tag": {
26
+ "type": "string",
27
+ "minLength": 1,
28
+ "description": "Tag name (e.g. 'v1.2.3')."
29
+ },
30
+ "message": {
31
+ "description": "If provided, create an annotated tag with this message. If absent, create a lightweight tag.",
32
+ "type": "string"
33
+ },
34
+ "ref": {
35
+ "description": "Commit/ref to tag (default: HEAD). Ignored if `delete` is true.",
36
+ "type": "string"
37
+ },
38
+ "delete": {
39
+ "default": false,
40
+ "description": "If true, delete the named tag instead of creating it.",
41
+ "type": "boolean"
42
+ }
43
+ },
44
+ "required": [
45
+ "format",
46
+ "tag",
47
+ "delete"
48
+ ],
49
+ "additionalProperties": false
50
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "@rethunk/mcp-multi-root-git: git_worktree_add",
4
+ "description": "Parameter schema for the 'git_worktree_add' MCP tool.",
5
+ "type": "object",
6
+ "properties": {
7
+ "workspaceRoot": {
8
+ "description": "Highest-priority override.",
9
+ "type": "string"
10
+ },
11
+ "rootIndex": {
12
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
13
+ "type": "integer",
14
+ "minimum": 0,
15
+ "maximum": 9007199254740991
16
+ },
17
+ "allWorkspaceRoots": {
18
+ "default": false,
19
+ "description": "Fan out across all MCP file roots.",
20
+ "type": "boolean"
21
+ },
22
+ "format": {
23
+ "default": "markdown",
24
+ "type": "string",
25
+ "enum": [
26
+ "markdown",
27
+ "json"
28
+ ]
29
+ },
30
+ "path": {
31
+ "type": "string",
32
+ "minLength": 1,
33
+ "description": "Filesystem path for the new worktree. Relative paths are resolved from the git toplevel."
34
+ },
35
+ "branch": {
36
+ "type": "string",
37
+ "minLength": 1,
38
+ "description": "Branch to check out in the new worktree. Created from `baseRef` if absent."
39
+ },
40
+ "baseRef": {
41
+ "description": "Commit-ish to base the new branch on when it does not yet exist. Default: HEAD.",
42
+ "type": "string"
43
+ }
44
+ },
45
+ "required": [
46
+ "allWorkspaceRoots",
47
+ "format",
48
+ "path",
49
+ "branch"
50
+ ],
51
+ "additionalProperties": false
52
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "@rethunk/mcp-multi-root-git: git_worktree_list",
4
+ "description": "Parameter schema for the 'git_worktree_list' MCP tool.",
5
+ "type": "object",
6
+ "properties": {
7
+ "workspaceRoot": {
8
+ "description": "Highest-priority override.",
9
+ "type": "string"
10
+ },
11
+ "rootIndex": {
12
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
13
+ "type": "integer",
14
+ "minimum": 0,
15
+ "maximum": 9007199254740991
16
+ },
17
+ "format": {
18
+ "default": "markdown",
19
+ "type": "string",
20
+ "enum": [
21
+ "markdown",
22
+ "json"
23
+ ]
24
+ }
25
+ },
26
+ "required": [
27
+ "format"
28
+ ],
29
+ "additionalProperties": false
30
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "@rethunk/mcp-multi-root-git: git_worktree_remove",
4
+ "description": "Parameter schema for the 'git_worktree_remove' MCP tool.",
5
+ "type": "object",
6
+ "properties": {
7
+ "workspaceRoot": {
8
+ "description": "Highest-priority override.",
9
+ "type": "string"
10
+ },
11
+ "rootIndex": {
12
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
13
+ "type": "integer",
14
+ "minimum": 0,
15
+ "maximum": 9007199254740991
16
+ },
17
+ "allWorkspaceRoots": {
18
+ "default": false,
19
+ "description": "Fan out across all MCP file roots.",
20
+ "type": "boolean"
21
+ },
22
+ "format": {
23
+ "default": "markdown",
24
+ "type": "string",
25
+ "enum": [
26
+ "markdown",
27
+ "json"
28
+ ]
29
+ },
30
+ "path": {
31
+ "type": "string",
32
+ "minLength": 1,
33
+ "description": "Path of the worktree to remove. Must not be the main worktree."
34
+ },
35
+ "force": {
36
+ "default": false,
37
+ "description": "Pass `--force` to allow removal of worktrees with uncommitted changes.",
38
+ "type": "boolean"
39
+ }
40
+ },
41
+ "required": [
42
+ "allWorkspaceRoots",
43
+ "format",
44
+ "path",
45
+ "force"
46
+ ],
47
+ "additionalProperties": false
48
+ }
@@ -0,0 +1,108 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "@rethunk/mcp-multi-root-git tool schemas index",
4
+ "description": "Index of all available MCP tool parameter schemas.",
5
+ "generatedBy": "scripts/generate-individual-schemas.ts",
6
+ "tools": [
7
+ {
8
+ "name": "git_status",
9
+ "file": "git_status.json",
10
+ "description": "Parameter schema for the 'git_status' MCP tool."
11
+ },
12
+ {
13
+ "name": "git_inventory",
14
+ "file": "git_inventory.json",
15
+ "description": "Parameter schema for the 'git_inventory' MCP tool."
16
+ },
17
+ {
18
+ "name": "git_parity",
19
+ "file": "git_parity.json",
20
+ "description": "Parameter schema for the 'git_parity' MCP tool."
21
+ },
22
+ {
23
+ "name": "list_presets",
24
+ "file": "list_presets.json",
25
+ "description": "Parameter schema for the 'list_presets' MCP tool."
26
+ },
27
+ {
28
+ "name": "git_log",
29
+ "file": "git_log.json",
30
+ "description": "Parameter schema for the 'git_log' MCP tool."
31
+ },
32
+ {
33
+ "name": "git_diff_summary",
34
+ "file": "git_diff_summary.json",
35
+ "description": "Parameter schema for the 'git_diff_summary' MCP tool."
36
+ },
37
+ {
38
+ "name": "git_diff",
39
+ "file": "git_diff.json",
40
+ "description": "Parameter schema for the 'git_diff' MCP tool."
41
+ },
42
+ {
43
+ "name": "git_show",
44
+ "file": "git_show.json",
45
+ "description": "Parameter schema for the 'git_show' MCP tool."
46
+ },
47
+ {
48
+ "name": "git_worktree_list",
49
+ "file": "git_worktree_list.json",
50
+ "description": "Parameter schema for the 'git_worktree_list' MCP tool."
51
+ },
52
+ {
53
+ "name": "git_stash_list",
54
+ "file": "git_stash_list.json",
55
+ "description": "Parameter schema for the 'git_stash_list' MCP tool."
56
+ },
57
+ {
58
+ "name": "git_fetch",
59
+ "file": "git_fetch.json",
60
+ "description": "Parameter schema for the 'git_fetch' MCP tool."
61
+ },
62
+ {
63
+ "name": "batch_commit",
64
+ "file": "batch_commit.json",
65
+ "description": "Parameter schema for the 'batch_commit' MCP tool."
66
+ },
67
+ {
68
+ "name": "git_push",
69
+ "file": "git_push.json",
70
+ "description": "Parameter schema for the 'git_push' MCP tool."
71
+ },
72
+ {
73
+ "name": "git_merge",
74
+ "file": "git_merge.json",
75
+ "description": "Parameter schema for the 'git_merge' MCP tool."
76
+ },
77
+ {
78
+ "name": "git_cherry_pick",
79
+ "file": "git_cherry_pick.json",
80
+ "description": "Parameter schema for the 'git_cherry_pick' MCP tool."
81
+ },
82
+ {
83
+ "name": "git_reset_soft",
84
+ "file": "git_reset_soft.json",
85
+ "description": "Parameter schema for the 'git_reset_soft' MCP tool."
86
+ },
87
+ {
88
+ "name": "git_tag",
89
+ "file": "git_tag.json",
90
+ "description": "Parameter schema for the 'git_tag' MCP tool."
91
+ },
92
+ {
93
+ "name": "git_worktree_add",
94
+ "file": "git_worktree_add.json",
95
+ "description": "Parameter schema for the 'git_worktree_add' MCP tool."
96
+ },
97
+ {
98
+ "name": "git_worktree_remove",
99
+ "file": "git_worktree_remove.json",
100
+ "description": "Parameter schema for the 'git_worktree_remove' MCP tool."
101
+ },
102
+ {
103
+ "name": "git_stash_apply",
104
+ "file": "git_stash_apply.json",
105
+ "description": "Parameter schema for the 'git_stash_apply' MCP tool."
106
+ }
107
+ ]
108
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "@rethunk/mcp-multi-root-git: list_presets",
4
+ "description": "Parameter schema for the 'list_presets' MCP tool.",
5
+ "type": "object",
6
+ "properties": {
7
+ "workspaceRoot": {
8
+ "description": "Highest-priority override.",
9
+ "type": "string"
10
+ },
11
+ "rootIndex": {
12
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
13
+ "type": "integer",
14
+ "minimum": 0,
15
+ "maximum": 9007199254740991
16
+ },
17
+ "allWorkspaceRoots": {
18
+ "default": false,
19
+ "description": "Fan out across all MCP file roots.",
20
+ "type": "boolean"
21
+ },
22
+ "absoluteGitRoots": {
23
+ "description": "Absolute paths to git repo roots. Use for many sibling clones under a non-git parent directory.",
24
+ "maxItems": 256,
25
+ "type": "array",
26
+ "items": {
27
+ "type": "string"
28
+ }
29
+ },
30
+ "format": {
31
+ "default": "markdown",
32
+ "type": "string",
33
+ "enum": [
34
+ "markdown",
35
+ "json"
36
+ ]
37
+ }
38
+ },
39
+ "required": [
40
+ "allWorkspaceRoots",
41
+ "format"
42
+ ],
43
+ "additionalProperties": false
44
+ }