@rethunk/mcp-multi-root-git 2.5.0 → 2.8.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 (41) hide show
  1. package/AGENTS.md +4 -4
  2. package/CHANGELOG.md +45 -1
  3. package/README.md +1 -1
  4. package/dist/server/batch-commit-tool.js +32 -10
  5. package/dist/server/error-codes.js +95 -0
  6. package/dist/server/git-blame-tool.js +227 -0
  7. package/dist/server/git-branch-list-tool.js +140 -0
  8. package/dist/server/git-cherry-pick-tool.js +11 -10
  9. package/dist/server/git-diff-summary-tool.js +10 -3
  10. package/dist/server/git-diff-tool.js +60 -13
  11. package/dist/server/git-fetch-tool.js +148 -13
  12. package/dist/server/git-inventory-tool.js +7 -6
  13. package/dist/server/git-log-tool.js +14 -4
  14. package/dist/server/git-merge-tool.js +15 -14
  15. package/dist/server/git-parity-tool.js +5 -4
  16. package/dist/server/git-push-tool.js +9 -5
  17. package/dist/server/git-reflog-tool.js +126 -0
  18. package/dist/server/git-refs.js +12 -5
  19. package/dist/server/git-reset-soft-tool.js +4 -3
  20. package/dist/server/git-show-tool.js +96 -22
  21. package/dist/server/git-stash-tool.js +17 -15
  22. package/dist/server/git-tag-tool.js +8 -7
  23. package/dist/server/git-worktree-tool.js +8 -7
  24. package/dist/server/git.js +86 -7
  25. package/dist/server/list-presets-tool.js +2 -1
  26. package/dist/server/presets-resource.js +3 -2
  27. package/dist/server/presets.js +11 -5
  28. package/dist/server/roots.js +11 -10
  29. package/dist/server/tool-parameter-schemas.js +9 -0
  30. package/dist/server/tools.js +6 -0
  31. package/dist/server.js +7 -0
  32. package/docs/mcp-tools.md +134 -12
  33. package/package.json +4 -3
  34. package/schemas/git_blame.json +52 -0
  35. package/schemas/git_branch_list.json +36 -0
  36. package/schemas/git_diff.json +14 -15
  37. package/schemas/git_diff_summary.json +0 -6
  38. package/schemas/git_reflog.json +44 -0
  39. package/schemas/git_show.json +13 -1
  40. package/schemas/index.json +15 -0
  41. package/tool-parameters.schema.json +153 -22
@@ -326,11 +326,6 @@
326
326
  "minimum": 0,
327
327
  "maximum": 9007199254740991
328
328
  },
329
- "allWorkspaceRoots": {
330
- "default": false,
331
- "description": "Fan out across all MCP file roots.",
332
- "type": "boolean"
333
- },
334
329
  "absoluteGitRoots": {
335
330
  "description": "Absolute paths to git repo roots. Use for many sibling clones under a non-git parent directory.",
336
331
  "maxItems": 256,
@@ -378,7 +373,6 @@
378
373
  }
379
374
  },
380
375
  "required": [
381
- "allWorkspaceRoots",
382
376
  "format",
383
377
  "maxLinesPerFile",
384
378
  "maxFiles"
@@ -399,19 +393,6 @@
399
393
  "minimum": 0,
400
394
  "maximum": 9007199254740991
401
395
  },
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
396
  "format": {
416
397
  "default": "markdown",
417
398
  "type": "string",
@@ -429,17 +410,29 @@
429
410
  "type": "string"
430
411
  },
431
412
  "path": {
432
- "description": "Scope diff to a single file path (e.g. \"src/main.ts\").",
413
+ "description": "Scope diff to a single file path (e.g. \"src/main.ts\"). For multiple files, prefer `paths`. If both `path` and `paths` are given, they are unioned.",
433
414
  "type": "string"
434
415
  },
416
+ "paths": {
417
+ "description": "Scope diff to multiple file paths (e.g. [\"src/a.ts\", \"src/b.ts\"]). Each path is validated and must lie within the repository root. If both `path` and `paths` are given, they are unioned.",
418
+ "type": "array",
419
+ "items": {
420
+ "type": "string"
421
+ }
422
+ },
435
423
  "staged": {
436
424
  "default": false,
437
425
  "description": "If true, show staged changes (git diff --staged). Ignored if `base` is provided.",
438
426
  "type": "boolean"
427
+ },
428
+ "unified": {
429
+ "description": "Number of context lines to show around each change (passed as -U<n> to git diff). Defaults to git's built-in default (3). Use 0 for no context.",
430
+ "type": "integer",
431
+ "minimum": 0,
432
+ "maximum": 100
439
433
  }
440
434
  },
441
435
  "required": [
442
- "allWorkspaceRoots",
443
436
  "format",
444
437
  "staged"
445
438
  ],
@@ -469,11 +462,23 @@
469
462
  },
470
463
  "ref": {
471
464
  "type": "string",
465
+ "minLength": 1,
472
466
  "description": "Commit reference (SHA, branch, tag, or any git rev-spec)."
473
467
  },
474
468
  "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.",
469
+ "description": "Optional single file path to inspect at the ref. Merged with `paths` when both are provided.",
476
470
  "type": "string"
471
+ },
472
+ "paths": {
473
+ "description": "Optional list of file paths to filter the shown diff/stat. Merged with `path` when both are provided.",
474
+ "type": "array",
475
+ "items": {
476
+ "type": "string"
477
+ }
478
+ },
479
+ "stat": {
480
+ "description": "When true, show --stat diffstat (files changed summary) instead of the full patch.",
481
+ "type": "boolean"
477
482
  }
478
483
  },
479
484
  "required": [
@@ -588,6 +593,132 @@
588
593
  ],
589
594
  "additionalProperties": false
590
595
  },
596
+ "git_blame": {
597
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
598
+ "type": "object",
599
+ "properties": {
600
+ "workspaceRoot": {
601
+ "description": "Highest-priority override.",
602
+ "type": "string"
603
+ },
604
+ "rootIndex": {
605
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
606
+ "type": "integer",
607
+ "minimum": 0,
608
+ "maximum": 9007199254740991
609
+ },
610
+ "format": {
611
+ "default": "markdown",
612
+ "type": "string",
613
+ "enum": [
614
+ "markdown",
615
+ "json"
616
+ ]
617
+ },
618
+ "path": {
619
+ "type": "string",
620
+ "minLength": 1,
621
+ "description": "Repo-relative path to the file to blame."
622
+ },
623
+ "ref": {
624
+ "description": "Optional commit-ish (SHA, branch, tag) to blame at.",
625
+ "type": "string"
626
+ },
627
+ "startLine": {
628
+ "description": "First line of the range to blame (1-based). Requires endLine.",
629
+ "type": "integer",
630
+ "minimum": 1,
631
+ "maximum": 9007199254740991
632
+ },
633
+ "endLine": {
634
+ "description": "Last line of the range to blame (1-based, inclusive). Requires startLine.",
635
+ "type": "integer",
636
+ "minimum": 1,
637
+ "maximum": 9007199254740991
638
+ }
639
+ },
640
+ "required": [
641
+ "format",
642
+ "path"
643
+ ],
644
+ "additionalProperties": false
645
+ },
646
+ "git_branch_list": {
647
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
648
+ "type": "object",
649
+ "properties": {
650
+ "workspaceRoot": {
651
+ "description": "Highest-priority override.",
652
+ "type": "string"
653
+ },
654
+ "rootIndex": {
655
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
656
+ "type": "integer",
657
+ "minimum": 0,
658
+ "maximum": 9007199254740991
659
+ },
660
+ "format": {
661
+ "default": "markdown",
662
+ "type": "string",
663
+ "enum": [
664
+ "markdown",
665
+ "json"
666
+ ]
667
+ },
668
+ "includeRemotes": {
669
+ "default": false,
670
+ "description": "When true, also return remote-tracking branches from refs/remotes (excluding symbolic origin/HEAD).",
671
+ "type": "boolean"
672
+ }
673
+ },
674
+ "required": [
675
+ "format",
676
+ "includeRemotes"
677
+ ],
678
+ "additionalProperties": false
679
+ },
680
+ "git_reflog": {
681
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
682
+ "type": "object",
683
+ "properties": {
684
+ "workspaceRoot": {
685
+ "description": "Highest-priority override.",
686
+ "type": "string"
687
+ },
688
+ "rootIndex": {
689
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
690
+ "type": "integer",
691
+ "minimum": 0,
692
+ "maximum": 9007199254740991
693
+ },
694
+ "format": {
695
+ "default": "markdown",
696
+ "type": "string",
697
+ "enum": [
698
+ "markdown",
699
+ "json"
700
+ ]
701
+ },
702
+ "ref": {
703
+ "default": "HEAD",
704
+ "description": "Ref whose reflog to show (branch name, HEAD, etc.). Default: HEAD.",
705
+ "type": "string"
706
+ },
707
+ "maxEntries": {
708
+ "default": 30,
709
+ "description": "Maximum reflog entries to return (hard cap 200). Default 30.",
710
+ "type": "integer",
711
+ "minimum": 1,
712
+ "maximum": 200
713
+ }
714
+ },
715
+ "required": [
716
+ "format",
717
+ "ref",
718
+ "maxEntries"
719
+ ],
720
+ "additionalProperties": false
721
+ },
591
722
  "batch_commit": {
592
723
  "$schema": "https://json-schema.org/draft/2020-12/schema",
593
724
  "type": "object",