Skip to main content
Glama

git_branches

Read-only

List local and remote-tracking Git branches with upstream tracking and current-branch metadata to identify branch state and relationships.

Instructions

List local and remote-tracking branches with upstream and current-branch metadata.

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_branches"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
refsYes
process_idsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.1

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, openWorldHint=false and destructiveHint=false, so safety is covered. The description adds that both local and remote-tracking refs are returned and that upstream/current markers are attached, which is useful, but it says nothing about ordering, volume of output, or behavior in a detached-HEAD state.

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?

A single front-loaded sentence with no filler; the scope qualifier and the metadata clause both carry real information for the caller.

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?

With an output schema present and zero parameters, the description need not explain return values, and it is essentially complete for this complexity. The only shortfall is the missing disambiguation from the singular 'git_branch' sibling.

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?

The tool takes zero parameters, so there are no parameter semantics to explain and the baseline of 4 applies. The description correctly adds no argument information, avoiding confusion.

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 narrows scope to 'local and remote-tracking branches' plus upstream and current-branch metadata. It is clear on its own, but it never contrasts itself with the sibling 'git_branch', which an agent could easily confuse with this listing tool.

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

Usage Guidelines3/5

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

The listing nature is implied and the read-only framing is obvious, but there is no explicit when-to-use guidance (e.g. inspect branches before git_switch or before creating one via git_branch) and no stated exclusions. The agent must infer its place among the git_* siblings.

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