Skip to main content
Glama

List repositories

list_repos
Read-onlyIdempotent

Retrieve 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

NameRequiredDescriptionDefault
sortNoOrder of the returned repos (default dirty-first).
limitNoReturn at most this many repos (after sorting). Default 50 for a brief answer; no limit with fields or detail: "full".
detailNobrief (default) keeps the answer small; full returns every field and is several times larger.
fieldsNoReturn 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.
selectorNoPredicate 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.9.2
    • addedInput schema / properties / detail
      Added value: +{
      +  "description": "brief (default) keeps the answer small; full returns every field and is several times larger.",
      +  "enum": [
      +    "brief",
      +    "full"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / fields / description
      Previous value: -"Project each repo to just these top-level keys (id and name are always kept) to keep the response small. Valid keys: branch, upstream, worktree, 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."New value: +"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."
    • changedInput schema / properties / limit / description
      Previous value: -"Return at most this many repos (after sorting)."New value: +"Return at most this many repos (after sorting). Default 50 for a brief answer; no limit with fields or detail: \"full\"."
    • changedInput schema / properties / selector / description
      Previous value: -"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, 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."New value: +"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."
  2. Changed1 schema field changedv0.8.21
    • changedInput schema / properties / selector / description
      Previous value: -"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, detached, conflicted, in_operation (merge/rebase/… mid-flight), error, branch (exact name), 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."New value: +"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, 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."
  3. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/non-destructive/closed-world, and the description goes well beyond that: it discloses result truncation ('first 50 repos in sort order, `omitted` counts the rest'), the semantics of absent keys ('a key that is absent is none or empty'), the size trade-off of detail: "full", and the GitHub-token dependency for CI/PR data. This is the kind of behavioral context annotations cannot carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the return contract and then the routing rule, with no filler sentences. It is a single dense paragraph with many nested parentheses, which costs some scanability for an agent parsing it, but essentially every clause carries usable information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only listing tool with a rich 5-parameter nested schema and no output schema, the description supplies what is missing: the shape and size of the answer, truncation and omission behavior, empty/absent key semantics, and token-gated fields. Nothing an agent needs to invoke this correctly is left unstated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3 and the schema already documents selector, fields, limit, sort, and detail. The description earns a bump by surfacing the operational defaults in prose — omit selector for the whole fleet, brief answer means 50 repos, fields/detail:"full" lifts the limit — which tells the agent how the parameters interact rather than what each one is individually.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource — 'The raw git state of many repos in one call' — and enumerates the returned fields (branch, upstream, worktrees, stashes, last commit, attention). It explicitly distinguishes itself from fleet_summary and overview, so an agent can separate this from its closest siblings without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

States the trigger conditions concretely ('whenever the user asks about their repos, projects, or fleet, or what is dirty/unpushed/behind'), names the two sibling alternatives and what they add, and issues an explicit negative instruction ('do NOT enumerate repos yourself with find or per-repo git'). Both when-to-use and when-not are covered.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.