Help us shape the future of Go! Take the 2026 Go Developer Survey

tool

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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

func RegisterDiff(server *mcpsdk.Server, cfg *config.Config)

RegisterDiff registers the git_iter_diff tool on the given MCP server.

func RegisterDo

func RegisterDo(server *mcpsdk.Server, cfg *config.Config)

RegisterDo registers the git_iter_do tool on the given MCP server.

func RegisterGet added in v0.3.0

func RegisterGet(server *mcpsdk.Server, cfg *config.Config)

RegisterGet registers the git_iter_get tool on the given MCP server.

func RegisterGrep

func RegisterGrep(server *mcpsdk.Server, cfg *config.Config)

RegisterGrep registers the git_iter_grep tool on the given MCP server.

func RegisterList

func RegisterList(server *mcpsdk.Server, cfg *config.Config)

RegisterList registers the git_iter_list tool on the given MCP server.

func RegisterLsFiles

func RegisterLsFiles(server *mcpsdk.Server, cfg *config.Config)

RegisterLsFiles registers the git_iter_ls_files tool on the given MCP server.

func RegisterStatus

func RegisterStatus(server *mcpsdk.Server, cfg *config.Config)

RegisterStatus registers the git_iter_status 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL