Skip to main content
Glama

Git branches

git_branches
Read-only

Lists Git branches in a repository, optionally including remote branches, and returns the current branch plus branch names and last commits as structured data.

Instructions

List git branches. Returns the current branch and [name, lastCommit] pairs; a remote branch's name starts with remotes/.

Input Schema

NameRequiredDescriptionDefault
cwdNoRepository path
remoteNoInclude remote branches

Output Schema

NameRequiredDescriptionDefault
currentYes
branchesYes
retainedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.0.1

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered structurally. The description adds the return shape (current branch plus [name, lastCommit] pairs) and the remotes/ naming convention, which are useful behavioral details. It does not go further into pagination or repository-state requirements, so a middling score is appropriate.

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

Conciseness5/5

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

Two short sentences, front-loaded with the core action and followed by the return shape. There is no wasted text.

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?

An output schema exists, so the description does not need to enumerate return values, yet it helpfully summarizes the key ones. The main remaining gap is the lack of guidance on when to prefer this tool over related git tools.

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 coverage is 100%, with both cwd and remote documented in the schema, so the baseline is 3. The description's note that remote branch names start with remotes/ is helpful context for the 'remote' flag but does not explicitly explain the parameter's behavior.

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

Purpose4/5

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

The description opens with a specific verb and resource ('List git branches'), which is unambiguous and does not overlap with any sibling tool (git_status, git_log, or git_diff cover other concerns). It stops short of explicitly contrasting itself with those siblings, so it falls just below a 5.

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

Usage Guidelines2/5

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

The description contains no guidance about when to call this tool versus alternatives such as git_status, git_log, or git_diff. An agent must infer the appropriate context on its own.

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