List repositories
list_reposRetrieve the raw git state of multiple repositories in one call: branches, ahead/behind, worktrees, stashes, last commits, attention flags, and optional CI/PR status.
Instructions
The raw git state of many repos in one call: each repo's branch, upstream (ahead/behind), worktree counts, stashes, last commit, an attention assessment, any linked worktree that holds uncommitted or unpushed work (worktrees, each with its path) and (with a GitHub token) its CI state and open pull requests, plus a fleet summary. Use this (or fleet_summary, or overview for what to do about it) whenever the user asks about their repos, projects, or fleet, or what is dirty/unpushed/behind/needs attention; do NOT enumerate repos yourself with find or per-repo git. Omit selector for the whole fleet, or narrow it (e.g. {"dirty": true}). The answer is brief: the first 50 repos in sort order (omitted counts the rest; pass limit for more), and a key that is absent is none or empty. Use fields for exact keys, or detail: "full" for every field of every repo, per-branch status included (large).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_repos"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Order of the returned repos (default dirty-first). | |
| limit | No | Return at most this many repos (after sorting). Default 50 for a brief answer; no limit with fields or detail: "full". | |
| detail | No | brief (default) keeps the answer small; full returns every field and is several times larger. | |
| fields | No | Return exactly these top-level keys for each repo (id and name are always kept), each whole. Valid keys: branch, branches (every local branch with its own ahead/behind), upstream, worktree, worktrees (every linked worktree, clean ones too), last_commit, activity, groups, stash_count, stash_latest, remote, remote_url, operation, default_branch, last_fetch, latest_tag, assessment, path, error. Note: ahead/behind live inside `upstream`, and staged/modified/untracked inside `worktree` — request those parent keys, not the leaf names. | |
| selector | No | Predicate that selects repos across the fleet; set fields to AND them, omit a field for no constraint (ADR-024). Scope: all (bool — the whole fleet), ids[str], name (glob, e.g. "pay*"), path_glob (* stays within one path segment, ** crosses /), root, group (a config-defined cluster name, e.g. "payments"). Local state: dirty, ahead (alias unpushed), behind, diverged, no_upstream, unpublished (a branch never pushed although the repo has a remote), stale_fetch (remote not fetched for over 14 days), has_stash, worktree_work (a linked worktree holds uncommitted files or commits never pushed), detached, conflicted, in_operation (merge/rebase/… mid-flight), error, branch (glob like name, e.g. "feat/*"; an exact name matches itself), attention ("any"|"notice"|"warn"|"risk"). Remote (needs a GitHub token): ci ("passing"|"failing"|"pending"|"none"), min_prs (int). Combine: any_of[selector] (OR), not (selector). The empty selector {} matches NOTHING by design — pass {"all": true} for the whole fleet. |