Skip to main content
Glama

git_branch_list

List Git branches with their last commit and upstream, and optionally include remote branches. Use this read-only view to inspect branch status before switching or merging.

Instructions

List branches with their last commit and upstream (read-only). all_branches includes remotes.

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

Input Schema

NameRequiredDescriptionDefault
repoNo.
all_branchesNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/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 reasonable work: it declares read-only semantics explicitly and discloses the shape of the result (last commit + upstream), plus the implicit default of local-only scope implied by 'all_branches includes remotes'. It stops short of stating ordering, pagination, or behavior on a non-repo path.

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, zero filler, and the core capability plus the read-only guarantee are front-loaded before the parameter note. Nothing could be removed without losing information.

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-optional-parameter read tool with an output schema (so return format needn't be described), the definition covers purpose, safety, and scope adequately. The remaining gap is the unexplained 'repo' parameter and default path semantics, which is minor but real.

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 supply meaning. It clarifies all_branches ('includes remotes') and implicitly confirms that the default excludes remotes, but says nothing about the 'repo' parameter beyond its existence, leaving one of two parameters undocumented anywhere.

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 gives a specific verb and resource ('List branches') and states what each entry carries (last commit and upstream), which separates it from git_branch_create and git_switch. It does not explicitly name a sibling it competes with, but the verb/resource pairing makes the distinction obvious.

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?

There is no explicit statement of when to choose this over git_status, git_log, or git_remote_info; the only conditional text ('all_branches includes remotes') is parameter behavior, not usage guidance. An agent must infer that this is the inspection tool for branch inventory.

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