Corral
Query your Corral-organised local mirror of cloned GitHub repositories. Zero network calls.
Versions
0.0.10latestTools 18
corral_list_repos List local clones in the Corral-organised workspace, optionally filtered by visibility (Public/Private), language, repository-name substring, or whether a sync sidecar is present. Results are paginated: the response carries total_matched, returned and next_offset; pass next_offset back as 'offset' to continue. Use response_format 'concise' (the default) unless you specifically need origin URLs and sync timestamps — 'detailed' is roughly ten times larger per repository.
corral_find_repo Resolve a fuzzy repository name (bare name, relative path, or path suffix) to a single local clone in the Corral workspace. Returns the matched repository, or an error listing all candidate paths when the query is ambiguous.
corral_get_repo_metadata Return full metadata for a single local clone: repository entry, current branch, and parsed sync state. The branch lookup spawns one git subprocess per call; prefer corral_list_repos for bulk queries.
corral_status_summary High-level workspace summary: total repository count and breakdowns by visibility and language. Cheap to compute; the right opening call for orienting in an unfamiliar workspace.
corral_workspace_index Return a whole-workspace summary plus a bounded page of repositories. Prefer corral_list_repos when you can filter — this returns everything and is the most expensive read here. Paginated: pass next_offset back as 'offset'. Defaults to the concise projection; 'detailed' adds origin URLs and sync state.
corral_graph_dependencies Analyze package dependencies across all repositories in the Corral workspace (Go modules, Rust crates, Node/TypeScript packages, Python projects). Returns the directed dependency graph, topological build and test execution order, detected cycles, and reverse dependent lookups.
corral_doctor Audit local repository clones in the Corral workspace for uncommitted changes, unpushed commits, detached heads, and linked worktrees. Returns workspace health summary and counts.
corral_discover_repos Scan the filesystem under base_dir (defaults to workspace root) to find local Git repositories that are untracked or unmanaged by Corral. Returns candidate paths, detected primary languages, and remote status with aggressive boundary pruning.
corral_search_code Search the contents of source and documentation files across every repository in the Corral workspace at once. Use this for where something is *used* — call sites, configuration keys, error strings — and corral_find_symbol for where something is *declared*. Returns file, line and the matching line's text, not whole files: read the file at the location it gives you. Only files the file resource would serve are searched, so credential files never match. Test files are excluded unless include_tests is set. Narrow with repo, language or path_glob on a large workspace; the response reports whether any bound was reached. When a name is spelled differently per language — MaxAttempts in Go, MAX_ATTEMPTS in Python, maxAttempts in TypeScript — a literal search finds only one of them; use regex for those, e.g. \"max_?attempts\".
corral_find_symbol Find where a function, method, type, interface, constant or variable is defined, across every repository in the Corral workspace — not just one. This is the tool to reach for when you know a name but not which repository it lives in. Returns file and line, not source: read the file at the location it gives you. Indexed languages:
corral_repo_overview Orient in a single repository in one call: its location and origin, how many source files it has, its declaration counts by kind, and its most significant exported types and functions. Cheaper and far smaller than listing the tree and reading files. Use it before corral_find_symbol when you do not yet know what a repository contains.
corral_sync_repo Run `git pull --rebase --autostash` against one clone in the Corral workspace. Requires --enable-mutations. Reuses corral's non-interactive git environment (no credential prompts, no signing pinentry) and honours smart-sync via the sync sidecar. Refuses when the repo isn't in the index or resolves outside the configured sandbox root.
corral_clone_repo Clone a repository into the Corral workspace. Requires --enable-mutations. Refuses when the target already exists (never overwrites) or would escape the sandbox root.
corral_create_worktree Create an isolated Git worktree for an agent under .git/corral-worktrees/<branch> linked to a repository clone. Requires --enable-mutations. Protects the developer's working directory by keeping agent branching and edits isolated. Refuses when the target worktree already exists or would escape the repository.
corral_release_worktree Remove a linked agent worktree created under .git/corral-worktrees. Requires --enable-mutations. Refuses when uncommitted or untracked changes exist in the worktree unless force=true is passed. Prunes stale worktree administrative metadata.
corral_prune_worktrees Prune stale, detached, or temporary agent worktrees across workspace repositories. Requires --enable-mutations. Skips main repository worktrees and refuses removal of modified worktrees unless force=true is passed.
corral_adopt_repo Adopt a local repository into the Corral workspace, optionally relocating it into layout taxonomy, provisioning a matching remote repository on a forge (GitHub, GitLab, Gitea, Bitbucket), and linking the remote origin. Requires --enable-mutations.
corral_delete_repo Remove one clone from the Corral workspace. Requires --enable-mutations AND --enable-destructive-mutations. Refuses when the clone holds uncommitted, unpushed, stashed, gitignored or submodule work, or when it resolves to the workspace root itself. Every attempt is written to the audit log.
Permissions 2
network medium filesystem low