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

tool

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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 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)"`
	Patterns    []string `json:"patterns,omitempty" jsonschema:"repository path filter regular expressions"`
	ReposRoot   string   `json:"repos_root,omitempty" jsonschema:"root directory to scan for repositories"`
	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)"`
	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"`
	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"`
	RemoteURL   string   `json:"remote_url,omitempty" jsonschema:"filter repositories by origin remote URL regex"`
}

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"`
	Patterns    []string `json:"patterns,omitempty" jsonschema:"repository path filter regular expressions"`
	ReposRoot   string   `json:"repos_root,omitempty" jsonschema:"root directory to scan for repositories"`
	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)"`
	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"`
	RemoteURL   string   `json:"remote_url,omitempty" jsonschema:"filter repositories by origin remote URL regex"`
}

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 GrepToolInput

type GrepToolInput struct {
	GrepArgs    []string `json:"grep_args" jsonschema:"arguments passed to git grep (patterns, flags)"`
	Patterns    []string `json:"patterns,omitempty" jsonschema:"repository path filter regular expressions"`
	ReposRoot   string   `json:"repos_root,omitempty" jsonschema:"root directory to scan for repositories"`
	AbsPath     bool     `json:"abs_path,omitempty" jsonschema:"show absolute paths instead of relative in grep results"`
	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)"`
	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"`
	RemoteURL   string   `json:"remote_url,omitempty" jsonschema:"filter repositories by origin remote URL regex"`
}

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 {
	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"`
	RemoteURL   string   `json:"remote_url,omitempty" jsonschema:"filter repositories by origin remote URL regex"`
}

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"`
	Patterns     []string `json:"patterns,omitempty" jsonschema:"repository path filter regular expressions"`
	ReposRoot    string   `json:"repos_root,omitempty" jsonschema:"root directory to scan for repositories"`
	AbsPath      bool     `json:"abs_path,omitempty" jsonschema:"show absolute paths instead of relative"`
	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)"`
	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"`
	RemoteURL    string   `json:"remote_url,omitempty" jsonschema:"filter repositories by origin remote URL regex"`
}

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 StatusToolInput

type StatusToolInput struct {
	StatusFlags []string `json:"status_flags,omitempty" jsonschema:"arguments and flags passed to git status"`
	Patterns    []string `json:"patterns,omitempty" jsonschema:"repository path filter regular expressions"`
	ReposRoot   string   `json:"repos_root,omitempty" jsonschema:"root directory to scan for repositories"`
	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)"`
	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"`
	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"`
	RemoteURL   string   `json:"remote_url,omitempty" jsonschema:"filter repositories by origin remote URL regex"`
}

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