@rethunk/mcp-multi-root-git 2.3.4 → 2.5.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 +30 -4
- package/CHANGELOG.md +74 -0
- package/HUMANS.md +54 -5
- package/README.md +15 -1
- package/dist/server/batch-commit-tool.js +266 -19
- package/dist/server/git-cherry-pick-tool.js +32 -8
- package/dist/server/git-diff-summary-tool.js +39 -21
- package/dist/server/git-diff-tool.js +132 -0
- package/dist/server/git-fetch-tool.js +131 -0
- package/dist/server/git-log-tool.js +37 -0
- package/dist/server/git-push-tool.js +8 -1
- package/dist/server/git-refs.js +72 -0
- package/dist/server/git-show-tool.js +148 -0
- package/dist/server/git-stash-tool.js +131 -0
- package/dist/server/git-tag-tool.js +162 -0
- package/dist/server/git.js +35 -4
- package/dist/server/roots.js +8 -4
- package/dist/server/test-harness.js +68 -5
- package/dist/server/tool-parameter-schemas.js +21 -1
- package/dist/server/tools.js +11 -0
- package/docs/install.md +19 -2
- package/docs/mcp-tools.md +443 -10
- package/package.json +18 -6
- package/schemas/batch_commit.json +125 -0
- package/schemas/git_cherry_pick.json +69 -0
- package/schemas/git_diff.json +62 -0
- package/schemas/git_diff_summary.json +75 -0
- package/schemas/git_fetch.json +52 -0
- package/schemas/git_inventory.json +74 -0
- package/schemas/git_log.json +77 -0
- package/schemas/git_merge.json +79 -0
- package/schemas/git_parity.json +74 -0
- package/schemas/git_push.json +50 -0
- package/schemas/git_reset_soft.json +42 -0
- package/schemas/git_show.json +39 -0
- package/schemas/git_stash_apply.json +44 -0
- package/schemas/git_stash_list.json +30 -0
- package/schemas/git_status.json +49 -0
- package/schemas/git_tag.json +50 -0
- package/schemas/git_worktree_add.json +52 -0
- package/schemas/git_worktree_list.json +30 -0
- package/schemas/git_worktree_remove.json +48 -0
- package/schemas/index.json +108 -0
- package/schemas/list_presets.json +44 -0
- package/tool-parameters.schema.json +327 -6
|
@@ -266,10 +266,12 @@
|
|
|
266
266
|
},
|
|
267
267
|
"format": {
|
|
268
268
|
"default": "markdown",
|
|
269
|
+
"description": "`markdown` (default): headed sections per root. `json`: structured groups array. `oneline`: `<sha7> <subject>` per line, no headers (single-root) or `### repo (branch)` separator per group (multi-root). Lowest-token option for post-commit verification.",
|
|
269
270
|
"type": "string",
|
|
270
271
|
"enum": [
|
|
271
272
|
"markdown",
|
|
272
|
-
"json"
|
|
273
|
+
"json",
|
|
274
|
+
"oneline"
|
|
273
275
|
]
|
|
274
276
|
},
|
|
275
277
|
"since": {
|
|
@@ -383,6 +385,103 @@
|
|
|
383
385
|
],
|
|
384
386
|
"additionalProperties": false
|
|
385
387
|
},
|
|
388
|
+
"git_diff": {
|
|
389
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
390
|
+
"type": "object",
|
|
391
|
+
"properties": {
|
|
392
|
+
"workspaceRoot": {
|
|
393
|
+
"description": "Highest-priority override.",
|
|
394
|
+
"type": "string"
|
|
395
|
+
},
|
|
396
|
+
"rootIndex": {
|
|
397
|
+
"description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
|
|
398
|
+
"type": "integer",
|
|
399
|
+
"minimum": 0,
|
|
400
|
+
"maximum": 9007199254740991
|
|
401
|
+
},
|
|
402
|
+
"allWorkspaceRoots": {
|
|
403
|
+
"default": false,
|
|
404
|
+
"description": "Fan out across all MCP file roots.",
|
|
405
|
+
"type": "boolean"
|
|
406
|
+
},
|
|
407
|
+
"absoluteGitRoots": {
|
|
408
|
+
"description": "Absolute paths to git repo roots. Use for many sibling clones under a non-git parent directory.",
|
|
409
|
+
"maxItems": 256,
|
|
410
|
+
"type": "array",
|
|
411
|
+
"items": {
|
|
412
|
+
"type": "string"
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
"format": {
|
|
416
|
+
"default": "markdown",
|
|
417
|
+
"type": "string",
|
|
418
|
+
"enum": [
|
|
419
|
+
"markdown",
|
|
420
|
+
"json"
|
|
421
|
+
]
|
|
422
|
+
},
|
|
423
|
+
"base": {
|
|
424
|
+
"description": "Base ref (e.g. \"main\", \"HEAD~3\"). Required for range diffs. If omitted and `staged: false`, shows unstaged changes.",
|
|
425
|
+
"type": "string"
|
|
426
|
+
},
|
|
427
|
+
"head": {
|
|
428
|
+
"description": "Head ref (e.g. \"feature-branch\"). If omitted, defaults to HEAD. Only used if `base` is provided.",
|
|
429
|
+
"type": "string"
|
|
430
|
+
},
|
|
431
|
+
"path": {
|
|
432
|
+
"description": "Scope diff to a single file path (e.g. \"src/main.ts\").",
|
|
433
|
+
"type": "string"
|
|
434
|
+
},
|
|
435
|
+
"staged": {
|
|
436
|
+
"default": false,
|
|
437
|
+
"description": "If true, show staged changes (git diff --staged). Ignored if `base` is provided.",
|
|
438
|
+
"type": "boolean"
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
"required": [
|
|
442
|
+
"allWorkspaceRoots",
|
|
443
|
+
"format",
|
|
444
|
+
"staged"
|
|
445
|
+
],
|
|
446
|
+
"additionalProperties": false
|
|
447
|
+
},
|
|
448
|
+
"git_show": {
|
|
449
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
450
|
+
"type": "object",
|
|
451
|
+
"properties": {
|
|
452
|
+
"workspaceRoot": {
|
|
453
|
+
"description": "Highest-priority override.",
|
|
454
|
+
"type": "string"
|
|
455
|
+
},
|
|
456
|
+
"rootIndex": {
|
|
457
|
+
"description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
|
|
458
|
+
"type": "integer",
|
|
459
|
+
"minimum": 0,
|
|
460
|
+
"maximum": 9007199254740991
|
|
461
|
+
},
|
|
462
|
+
"format": {
|
|
463
|
+
"default": "markdown",
|
|
464
|
+
"type": "string",
|
|
465
|
+
"enum": [
|
|
466
|
+
"markdown",
|
|
467
|
+
"json"
|
|
468
|
+
]
|
|
469
|
+
},
|
|
470
|
+
"ref": {
|
|
471
|
+
"type": "string",
|
|
472
|
+
"description": "Commit reference (SHA, branch, tag, or any git rev-spec)."
|
|
473
|
+
},
|
|
474
|
+
"path": {
|
|
475
|
+
"description": "Optional file path to inspect at the ref. If provided, shows that path's content at the ref instead of the diff.",
|
|
476
|
+
"type": "string"
|
|
477
|
+
}
|
|
478
|
+
},
|
|
479
|
+
"required": [
|
|
480
|
+
"format",
|
|
481
|
+
"ref"
|
|
482
|
+
],
|
|
483
|
+
"additionalProperties": false
|
|
484
|
+
},
|
|
386
485
|
"git_worktree_list": {
|
|
387
486
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
388
487
|
"type": "object",
|
|
@@ -411,6 +510,84 @@
|
|
|
411
510
|
],
|
|
412
511
|
"additionalProperties": false
|
|
413
512
|
},
|
|
513
|
+
"git_stash_list": {
|
|
514
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
515
|
+
"type": "object",
|
|
516
|
+
"properties": {
|
|
517
|
+
"workspaceRoot": {
|
|
518
|
+
"description": "Highest-priority override.",
|
|
519
|
+
"type": "string"
|
|
520
|
+
},
|
|
521
|
+
"rootIndex": {
|
|
522
|
+
"description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
|
|
523
|
+
"type": "integer",
|
|
524
|
+
"minimum": 0,
|
|
525
|
+
"maximum": 9007199254740991
|
|
526
|
+
},
|
|
527
|
+
"format": {
|
|
528
|
+
"default": "markdown",
|
|
529
|
+
"type": "string",
|
|
530
|
+
"enum": [
|
|
531
|
+
"markdown",
|
|
532
|
+
"json"
|
|
533
|
+
]
|
|
534
|
+
}
|
|
535
|
+
},
|
|
536
|
+
"required": [
|
|
537
|
+
"format"
|
|
538
|
+
],
|
|
539
|
+
"additionalProperties": false
|
|
540
|
+
},
|
|
541
|
+
"git_fetch": {
|
|
542
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
543
|
+
"type": "object",
|
|
544
|
+
"properties": {
|
|
545
|
+
"workspaceRoot": {
|
|
546
|
+
"description": "Highest-priority override.",
|
|
547
|
+
"type": "string"
|
|
548
|
+
},
|
|
549
|
+
"rootIndex": {
|
|
550
|
+
"description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
|
|
551
|
+
"type": "integer",
|
|
552
|
+
"minimum": 0,
|
|
553
|
+
"maximum": 9007199254740991
|
|
554
|
+
},
|
|
555
|
+
"format": {
|
|
556
|
+
"default": "markdown",
|
|
557
|
+
"type": "string",
|
|
558
|
+
"enum": [
|
|
559
|
+
"markdown",
|
|
560
|
+
"json"
|
|
561
|
+
]
|
|
562
|
+
},
|
|
563
|
+
"remote": {
|
|
564
|
+
"default": "origin",
|
|
565
|
+
"description": "Remote to fetch from (default: origin).",
|
|
566
|
+
"type": "string"
|
|
567
|
+
},
|
|
568
|
+
"branch": {
|
|
569
|
+
"description": "If specified: fetch only this branch (e.g. 'main').",
|
|
570
|
+
"type": "string"
|
|
571
|
+
},
|
|
572
|
+
"prune": {
|
|
573
|
+
"default": false,
|
|
574
|
+
"description": "Pass --prune to remove deleted remote branches (default: false).",
|
|
575
|
+
"type": "boolean"
|
|
576
|
+
},
|
|
577
|
+
"tags": {
|
|
578
|
+
"default": false,
|
|
579
|
+
"description": "Pass --tags to also fetch all tags (default: false).",
|
|
580
|
+
"type": "boolean"
|
|
581
|
+
}
|
|
582
|
+
},
|
|
583
|
+
"required": [
|
|
584
|
+
"format",
|
|
585
|
+
"remote",
|
|
586
|
+
"prune",
|
|
587
|
+
"tags"
|
|
588
|
+
],
|
|
589
|
+
"additionalProperties": false
|
|
590
|
+
},
|
|
414
591
|
"batch_commit": {
|
|
415
592
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
416
593
|
"type": "object",
|
|
@@ -454,10 +631,52 @@
|
|
|
454
631
|
"minItems": 1,
|
|
455
632
|
"type": "array",
|
|
456
633
|
"items": {
|
|
457
|
-
"
|
|
458
|
-
|
|
634
|
+
"anyOf": [
|
|
635
|
+
{
|
|
636
|
+
"type": "string",
|
|
637
|
+
"minLength": 1
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
"type": "object",
|
|
641
|
+
"properties": {
|
|
642
|
+
"path": {
|
|
643
|
+
"type": "string",
|
|
644
|
+
"minLength": 1,
|
|
645
|
+
"description": "File path relative to git root."
|
|
646
|
+
},
|
|
647
|
+
"lines": {
|
|
648
|
+
"type": "object",
|
|
649
|
+
"properties": {
|
|
650
|
+
"from": {
|
|
651
|
+
"type": "integer",
|
|
652
|
+
"minimum": 1,
|
|
653
|
+
"maximum": 9007199254740991,
|
|
654
|
+
"description": "Start line number (1-indexed)."
|
|
655
|
+
},
|
|
656
|
+
"to": {
|
|
657
|
+
"type": "integer",
|
|
658
|
+
"minimum": 1,
|
|
659
|
+
"maximum": 9007199254740991,
|
|
660
|
+
"description": "End line number (1-indexed, inclusive)."
|
|
661
|
+
}
|
|
662
|
+
},
|
|
663
|
+
"required": [
|
|
664
|
+
"from",
|
|
665
|
+
"to"
|
|
666
|
+
],
|
|
667
|
+
"additionalProperties": false,
|
|
668
|
+
"description": "Line range to stage. Only hunks overlapping [from, to] are staged."
|
|
669
|
+
}
|
|
670
|
+
},
|
|
671
|
+
"required": [
|
|
672
|
+
"path",
|
|
673
|
+
"lines"
|
|
674
|
+
],
|
|
675
|
+
"additionalProperties": false
|
|
676
|
+
}
|
|
677
|
+
]
|
|
459
678
|
},
|
|
460
|
-
"description": "Paths to stage, relative to the git root."
|
|
679
|
+
"description": "Paths to stage, relative to the git root. Each can be a string path or { path, lines } for hunk-level staging. Deleted files (missing on disk but tracked in HEAD) are staged as removals via `git rm --cached`. Combining { path, lines } with a deleted file is an error."
|
|
461
680
|
}
|
|
462
681
|
},
|
|
463
682
|
"required": [
|
|
@@ -476,13 +695,19 @@
|
|
|
476
695
|
"never",
|
|
477
696
|
"after"
|
|
478
697
|
]
|
|
698
|
+
},
|
|
699
|
+
"dryRun": {
|
|
700
|
+
"default": false,
|
|
701
|
+
"description": "When true, stage files, collect preview (files staged, commit messages), return preview response without writing commits. Unstages any files that were staged for the preview. Response indicates DRY RUN mode.",
|
|
702
|
+
"type": "boolean"
|
|
479
703
|
}
|
|
480
704
|
},
|
|
481
705
|
"required": [
|
|
482
706
|
"allWorkspaceRoots",
|
|
483
707
|
"format",
|
|
484
708
|
"commits",
|
|
485
|
-
"push"
|
|
709
|
+
"push",
|
|
710
|
+
"dryRun"
|
|
486
711
|
],
|
|
487
712
|
"additionalProperties": false
|
|
488
713
|
},
|
|
@@ -661,6 +886,11 @@
|
|
|
661
886
|
"default": false,
|
|
662
887
|
"description": "After success, remove any local worktree attached to a branch-kind source (`git worktree remove`). Protected tails always skipped.",
|
|
663
888
|
"type": "boolean"
|
|
889
|
+
},
|
|
890
|
+
"strictMergedRefEquality": {
|
|
891
|
+
"default": false,
|
|
892
|
+
"description": "When false (default), branch deletion uses patch-id equivalence: a source branch is deleted when every commit it contains has a content-equivalent commit on the destination (same diff, different SHA — the normal cherry-pick outcome). Set to true to require strict ref ancestry (`git branch -d` semantics), which will refuse deletion after a cherry-pick because the SHA differs.",
|
|
893
|
+
"type": "boolean"
|
|
664
894
|
}
|
|
665
895
|
},
|
|
666
896
|
"required": [
|
|
@@ -668,7 +898,8 @@
|
|
|
668
898
|
"format",
|
|
669
899
|
"sources",
|
|
670
900
|
"deleteMergedBranches",
|
|
671
|
-
"deleteMergedWorktrees"
|
|
901
|
+
"deleteMergedWorktrees",
|
|
902
|
+
"strictMergedRefEquality"
|
|
672
903
|
],
|
|
673
904
|
"additionalProperties": false
|
|
674
905
|
},
|
|
@@ -712,6 +943,54 @@
|
|
|
712
943
|
],
|
|
713
944
|
"additionalProperties": false
|
|
714
945
|
},
|
|
946
|
+
"git_tag": {
|
|
947
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
948
|
+
"type": "object",
|
|
949
|
+
"properties": {
|
|
950
|
+
"workspaceRoot": {
|
|
951
|
+
"description": "Highest-priority override.",
|
|
952
|
+
"type": "string"
|
|
953
|
+
},
|
|
954
|
+
"rootIndex": {
|
|
955
|
+
"description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
|
|
956
|
+
"type": "integer",
|
|
957
|
+
"minimum": 0,
|
|
958
|
+
"maximum": 9007199254740991
|
|
959
|
+
},
|
|
960
|
+
"format": {
|
|
961
|
+
"default": "markdown",
|
|
962
|
+
"type": "string",
|
|
963
|
+
"enum": [
|
|
964
|
+
"markdown",
|
|
965
|
+
"json"
|
|
966
|
+
]
|
|
967
|
+
},
|
|
968
|
+
"tag": {
|
|
969
|
+
"type": "string",
|
|
970
|
+
"minLength": 1,
|
|
971
|
+
"description": "Tag name (e.g. 'v1.2.3')."
|
|
972
|
+
},
|
|
973
|
+
"message": {
|
|
974
|
+
"description": "If provided, create an annotated tag with this message. If absent, create a lightweight tag.",
|
|
975
|
+
"type": "string"
|
|
976
|
+
},
|
|
977
|
+
"ref": {
|
|
978
|
+
"description": "Commit/ref to tag (default: HEAD). Ignored if `delete` is true.",
|
|
979
|
+
"type": "string"
|
|
980
|
+
},
|
|
981
|
+
"delete": {
|
|
982
|
+
"default": false,
|
|
983
|
+
"description": "If true, delete the named tag instead of creating it.",
|
|
984
|
+
"type": "boolean"
|
|
985
|
+
}
|
|
986
|
+
},
|
|
987
|
+
"required": [
|
|
988
|
+
"format",
|
|
989
|
+
"tag",
|
|
990
|
+
"delete"
|
|
991
|
+
],
|
|
992
|
+
"additionalProperties": false
|
|
993
|
+
},
|
|
715
994
|
"git_worktree_add": {
|
|
716
995
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
717
996
|
"type": "object",
|
|
@@ -807,6 +1086,48 @@
|
|
|
807
1086
|
"force"
|
|
808
1087
|
],
|
|
809
1088
|
"additionalProperties": false
|
|
1089
|
+
},
|
|
1090
|
+
"git_stash_apply": {
|
|
1091
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1092
|
+
"type": "object",
|
|
1093
|
+
"properties": {
|
|
1094
|
+
"workspaceRoot": {
|
|
1095
|
+
"description": "Highest-priority override.",
|
|
1096
|
+
"type": "string"
|
|
1097
|
+
},
|
|
1098
|
+
"rootIndex": {
|
|
1099
|
+
"description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
|
|
1100
|
+
"type": "integer",
|
|
1101
|
+
"minimum": 0,
|
|
1102
|
+
"maximum": 9007199254740991
|
|
1103
|
+
},
|
|
1104
|
+
"format": {
|
|
1105
|
+
"default": "markdown",
|
|
1106
|
+
"type": "string",
|
|
1107
|
+
"enum": [
|
|
1108
|
+
"markdown",
|
|
1109
|
+
"json"
|
|
1110
|
+
]
|
|
1111
|
+
},
|
|
1112
|
+
"index": {
|
|
1113
|
+
"default": 0,
|
|
1114
|
+
"description": "Stash index (defaults to 0 for stash@{0}).",
|
|
1115
|
+
"type": "integer",
|
|
1116
|
+
"minimum": 0,
|
|
1117
|
+
"maximum": 9007199254740991
|
|
1118
|
+
},
|
|
1119
|
+
"pop": {
|
|
1120
|
+
"default": false,
|
|
1121
|
+
"description": "If true, runs `git stash pop` instead of `git stash apply` (removes stash after applying).",
|
|
1122
|
+
"type": "boolean"
|
|
1123
|
+
}
|
|
1124
|
+
},
|
|
1125
|
+
"required": [
|
|
1126
|
+
"format",
|
|
1127
|
+
"index",
|
|
1128
|
+
"pop"
|
|
1129
|
+
],
|
|
1130
|
+
"additionalProperties": false
|
|
810
1131
|
}
|
|
811
1132
|
}
|
|
812
1133
|
}
|