Documentation
¶
Index ¶
- Variables
- func RegisterDiff(server *mcpsdk.Server, cfg *config.Config)
- func RegisterDo(server *mcpsdk.Server, cfg *config.Config)
- func RegisterGet(server *mcpsdk.Server, cfg *config.Config)
- func RegisterGrep(server *mcpsdk.Server, cfg *config.Config)
- func RegisterList(server *mcpsdk.Server, cfg *config.Config)
- func RegisterLsFiles(server *mcpsdk.Server, cfg *config.Config)
- func RegisterStatus(server *mcpsdk.Server, cfg *config.Config)
- func RegisterWorktreeList(server *mcpsdk.Server, cfg *config.Config)
- func RegisterWorktreeMutations(server *mcpsdk.Server, cfg *config.Config)
- type DiffToolInput
- type DiffToolOutput
- type DoToolInput
- type DoToolOutput
- type GetToolInput
- type GetToolOutput
- type GrepToolInput
- type GrepToolOutput
- type ListToolsInput
- type ListToolsOutput
- type LsFilesToolInput
- type LsFilesToolOutput
- type ProcessExecInput
- type RepoDiscoveryInput
- type RepoStatusFilterInput
- type StatusToolInput
- type StatusToolOutput
- type WorktreeAddToolInput
- type WorktreeAddToolOutput
- type WorktreeListToolInput
- type WorktreeListToolOutput
- type WorktreePruneToolInput
- type WorktreePruneToolOutput
- type WorktreeRemoveToolInput
- type WorktreeRemoveToolOutput
Constants ¶
This section is empty.
Variables ¶
var ErrConflictingBranchFlags = errors.New("cannot specify both default_branch_only and not_default_branch_only")
ErrConflictingBranchFlags is returned when both default_branch_only and not_default_branch_only are set.
var ErrConflictingFilterFlags = errors.New("cannot specify both dirty_only and clean_only")
ErrConflictingFilterFlags is returned when both dirty_only and clean_only are set.
Functions ¶
func RegisterDiff ¶
RegisterDiff registers the git_iter_diff tool on the given MCP server.
func RegisterDo ¶
RegisterDo registers the git_iter_do tool on the given MCP server.
func RegisterGet ¶ added in v0.3.0
RegisterGet registers the git_iter_get tool on the given MCP server.
func RegisterGrep ¶
RegisterGrep registers the git_iter_grep tool on the given MCP server.
func RegisterList ¶
RegisterList registers the git_iter_list tool on the given MCP server.
func RegisterLsFiles ¶
RegisterLsFiles registers the git_iter_ls_files tool on the given MCP server.
func RegisterStatus ¶
RegisterStatus registers the git_iter_status tool on the given MCP server.
func RegisterWorktreeList ¶ added in v0.4.0
RegisterWorktreeList registers the read-only git_iter_worktree_list tool on the given MCP server.
Types ¶
type DiffToolInput ¶
type DiffToolInput struct {
DiffFlags []string `json:"diff_flags,omitempty" jsonschema:"arguments and flags passed to git diff"`
Interactive bool `json:"interactive,omitempty" jsonschema:"enable pager and interactive diff (default false)"`
RepoDiscoveryInput
RepoStatusFilterInput
ProcessExecInput
}
DiffToolInput defines parameters for git_iter_diff tool.
type DiffToolOutput ¶
type DiffToolOutput struct {
Results []output.Result `json:"results" jsonschema:"git diff results per repository"`
}
DiffToolOutput defines output for git_iter_diff tool.
type DoToolInput ¶
type DoToolInput struct {
Command []string `json:"command" jsonschema:"command and arguments to execute in each repository"`
RepoDiscoveryInput
ProcessExecInput
}
DoToolInput defines parameters for git_iter_do tool.
type DoToolOutput ¶
type DoToolOutput struct {
Results []output.Result `json:"results" jsonschema:"execution results per repository"`
}
DoToolOutput defines output for git_iter_do tool.
type GetToolInput ¶ added in v0.3.0
type GetToolInput struct {
URI string `` /* 134-byte string literal not displayed */
RepoDiscoveryInput
Timeout string `json:"timeout,omitempty" jsonschema:"per-process execution timeout for git clone (e.g. 5s, 1m)"`
}
GetToolInput defines parameters for git_iter_get tool.
type GetToolOutput ¶ added in v0.3.0
type GetToolOutput struct {
Repositories []output.RepoResult `json:"repositories" jsonschema:"resolved or discovered repositories"`
}
GetToolOutput defines output for git_iter_get tool.
type GrepToolInput ¶
type GrepToolInput struct {
GrepArgs []string `json:"grep_args" jsonschema:"arguments passed to git grep (patterns, flags)"`
AbsPath bool `json:"abs_path,omitempty" jsonschema:"show absolute paths instead of relative in grep results"`
RepoDiscoveryInput
ProcessExecInput
}
GrepToolInput defines parameters for git_iter_grep tool.
type GrepToolOutput ¶
type GrepToolOutput struct {
Results []output.Result `json:"results" jsonschema:"grep results per repository"`
}
GrepToolOutput defines output for git_iter_grep tool.
type ListToolsInput ¶
type ListToolsInput struct {
RepoDiscoveryInput
}
ListToolsInput defines parameters for git_iter_list tool.
type ListToolsOutput ¶
type ListToolsOutput struct {
Repositories []output.RepoResult `json:"repositories" jsonschema:"discovered repositories"`
}
ListToolsOutput defines output for git_iter_list tool.
type LsFilesToolInput ¶
type LsFilesToolInput struct {
LsFilesFlags []string `json:"ls_files_flags,omitempty" jsonschema:"arguments passed to git ls-files"`
AbsPath bool `json:"abs_path,omitempty" jsonschema:"show absolute paths instead of relative"`
RepoDiscoveryInput
ProcessExecInput
}
LsFilesToolInput defines parameters for git_iter_ls_files tool.
type LsFilesToolOutput ¶
type LsFilesToolOutput struct {
Results []output.Result `json:"results" jsonschema:"matching files with prefixed paths"`
}
LsFilesToolOutput defines output for git_iter_ls_files tool.
type ProcessExecInput ¶ added in v0.2.0
type ProcessExecInput struct {
MaxProcs int `json:"max_procs,omitempty" jsonschema:"maximum parallel processes (default 1)"`
Timeout string `json:"timeout,omitempty" jsonschema:"per-process execution timeout (e.g. 5s, 1m)"`
}
ProcessExecInput defines process execution control parameters.
type RepoDiscoveryInput ¶ added in v0.2.0
type RepoDiscoveryInput struct {
Patterns []string `json:"patterns,omitempty" jsonschema:"repository path filter regular expressions"`
ReposRoot string `json:"repos_root,omitempty" jsonschema:"root directory to scan for repositories"`
Sort bool `json:"sort,omitempty" jsonschema:"sort repository paths in ascending order"`
SortReverse bool `json:"sort_reverse,omitempty" jsonschema:"sort repository paths in descending order"`
Limit int `json:"limit,omitempty" jsonschema:"limit number of processed repositories"`
DefaultBranchOnly bool `json:"default_branch_only,omitempty" jsonschema:"only include repositories whose current branch is the default branch"`
NotDefaultBranchOnly bool `` /* 126-byte string literal not displayed */
Branch string `json:"branch,omitempty" jsonschema:"filter repositories by current branch regex"`
RemoteURL string `json:"remote_url,omitempty" jsonschema:"filter repositories by origin remote URL regex"`
}
RepoDiscoveryInput defines common parameters for discovering and filtering git repositories.
type RepoStatusFilterInput ¶ added in v0.2.0
type RepoStatusFilterInput struct {
DirtyOnly bool `json:"dirty_only,omitempty" jsonschema:"only run in repositories with uncommitted changes"`
CleanOnly bool `json:"clean_only,omitempty" jsonschema:"only run in repositories without uncommitted changes"`
}
RepoStatusFilterInput defines dirty/clean status filters for git status and git diff.
type StatusToolInput ¶
type StatusToolInput struct {
StatusFlags []string `json:"status_flags,omitempty" jsonschema:"arguments and flags passed to git status"`
RepoDiscoveryInput
RepoStatusFilterInput
ProcessExecInput
}
StatusToolInput defines parameters for git_iter_status tool.
type StatusToolOutput ¶
type StatusToolOutput struct {
Results []output.Result `json:"results" jsonschema:"git status results per repository"`
}
StatusToolOutput defines output for git_iter_status tool.
type WorktreeAddToolInput ¶ added in v0.4.0
type WorktreeAddToolInput struct {
Branch string `json:"branch" jsonschema:"existing branch name to checkout (or base branch when new_branch is specified)"`
NewBranch string `json:"new_branch,omitempty" jsonschema:"optional new branch name (-b) to create starting from branch"`
RepoDir string `json:"repo_dir,omitempty" jsonschema:"target main repository directory (defaults to current working directory)"`
ReposRoot string `json:"repos_root,omitempty" jsonschema:"root directory of local repositories"`
WorktreeRoot string `json:"worktree_root,omitempty" jsonschema:"root directory of git worktrees (defaults to <repos_root>/git-worktree)"`
Timeout string `json:"timeout,omitempty" jsonschema:"per-process execution timeout (e.g. 5s, 1m)"`
}
WorktreeAddToolInput defines parameters for git_iter_worktree_add tool.
type WorktreeAddToolOutput ¶ added in v0.4.0
type WorktreeAddToolOutput struct {
Worktree output.RepoResult `json:"worktree" jsonschema:"created worktree path"`
}
WorktreeAddToolOutput defines output for git_iter_worktree_add tool.
type WorktreeListToolInput ¶ added in v0.4.0
type WorktreeListToolInput struct {
WorktreeRoot string `json:"worktree_root,omitempty" jsonschema:"root directory of git worktrees (defaults to <repos_root>/git-worktree)"`
Repo bool `json:"repo,omitempty" jsonschema:"when true, return unique main repository paths corresponding to discovered worktrees"`
RepoDiscoveryInput
}
WorktreeListToolInput defines parameters for git_iter_worktree_list tool.
type WorktreeListToolOutput ¶ added in v0.4.0
type WorktreeListToolOutput struct {
Worktrees []output.WorktreeResult `json:"worktrees,omitempty" jsonschema:"discovered worktrees with main repository path and branch"`
Repositories []output.RepoResult `json:"repositories,omitempty" jsonschema:"discovered worktrees or corresponding main repositories"`
}
WorktreeListToolOutput defines output for git_iter_worktree_list tool.
type WorktreePruneToolInput ¶ added in v0.4.0
type WorktreePruneToolInput struct {
DryRun bool `json:"dry_run,omitempty" jsonschema:"do not remove anything; report what would be pruned"`
All bool `json:"all,omitempty" jsonschema:"prune across all repositories that have worktrees under worktree_root"`
RepoDir string `` /* 129-byte string literal not displayed */
WorktreeRoot string `json:"worktree_root,omitempty" jsonschema:"root directory of git worktrees (defaults to <repos_root>/git-worktree)"`
RepoDiscoveryInput
ProcessExecInput
}
WorktreePruneToolInput defines parameters for git_iter_worktree_prune tool.
type WorktreePruneToolOutput ¶ added in v0.4.0
type WorktreePruneToolOutput struct {
Results []output.Result `json:"results" jsonschema:"prune execution results per repository"`
}
WorktreePruneToolOutput defines output for git_iter_worktree_prune tool.
type WorktreeRemoveToolInput ¶ added in v0.4.0
type WorktreeRemoveToolInput struct {
Branch string `json:"branch" jsonschema:"branch name whose worktree should be removed"`
Force bool `json:"force,omitempty" jsonschema:"force removal even if worktree is dirty"`
NoForce bool `json:"no_force,omitempty" jsonschema:"do not force removal"`
DeleteBranch bool `json:"delete_branch,omitempty" jsonschema:"delete local branch after removing worktree (-d, or -D if force is true)"`
ForceDeleteBranch bool `json:"force_delete_branch,omitempty" jsonschema:"force-delete local branch and force-remove worktree (-D)"`
RepoDir string `json:"repo_dir,omitempty" jsonschema:"target main repository directory (defaults to current working directory)"`
ReposRoot string `json:"repos_root,omitempty" jsonschema:"root directory of local repositories"`
WorktreeRoot string `json:"worktree_root,omitempty" jsonschema:"root directory of git worktrees (defaults to <repos_root>/git-worktree)"`
Timeout string `json:"timeout,omitempty" jsonschema:"per-process execution timeout (e.g. 5s, 1m)"`
}
WorktreeRemoveToolInput defines parameters for git_iter_worktree_remove tool.
type WorktreeRemoveToolOutput ¶ added in v0.4.0
type WorktreeRemoveToolOutput struct {
Worktree output.RepoResult `json:"worktree" jsonschema:"removed worktree path"`
}
WorktreeRemoveToolOutput defines output for git_iter_worktree_remove tool.