Skip to main content
Glama

branches

Inventories repo worktrees and standalone git refs, reporting HEAD, ahead/behind trunk, dirty counts, and the coding agent assigned to each. Read-only: no fetches.

Instructions

Inventory this repo's worktrees and branches — the zoo coding agents leave behind — and who each one belongs to. Read-only: it runs only read-only git and never fetches, so ahead/behind is against the LOCAL origin/.

Each worktree and each bare branch (one with no worktree) comes back with its branch, HEAD, ahead/behind the trunk, whether it is already in the trunk, dirty count (tracked changes only), and the cabildo agent living there when one is known (live session, else the spawn ledger). repo defaults to your own working directory.

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": "branches"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoNo
targetNomain

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it guarantees read-only git operations, discloses that no fetch occurs (so ahead/behind may be stale), defines dirty count as tracked changes only, and explains the agent-attribution fallback order (live session, else spawn ledger). It also enumerates the returned fields, which matters since no output schema exists.

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?

Purpose is front-loaded in the first sentence, followed by behavioral constraints and then the return-field inventory. The middle sentence is densely packed with jargon ("the zoo coding agents leave behind", "cabildo agent") and is longer than needed, but the length is justified by the absence of an output schema.

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

Completeness4/5

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

For a two-parameter read-only tool with no annotations and no output schema, the definition covers most of what an agent needs: what it reads, what it will not do (fetch), and what each returned entry contains. Minor gaps remain around failure modes (e.g., path that is not a git repo) and the exact accepted format of `target`.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate. It clarifies `repo` well ("defaults to your own working directory") and implicitly defines `target` as the trunk ref used for ahead/behind and in-trunk checks, but never states the accepted format for `target` (branch name vs. remote ref) or how `repo` should be expressed (path, name, remote URL).

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?

The description uses a specific verb and resource: "Inventory this repo's worktrees and branches ... and who each one belongs to." Scope is further narrowed by naming worktrees, bare branches, and agent attribution, and no sibling tool in the provided list touches git state, so there is no ambiguity to resolve.

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

Usage Guidelines4/5

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

It supplies clear context for using the result: it is read-only, it never fetches, so ahead/behind is measured against LOCAL origin/<target>, and `repo` defaults to your working directory. It stops short of explicit when-to-use/when-not statements, but with no competing sibling for branch inventory the practical guidance is adequate.

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