Skip to main content
Glama

git branch

git_branch

Display local branches and their upstream tracking information to verify branch relationships and remote status.

Instructions

Show branches and tracking info.

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

Input Schema

NameRequiredDescriptionDefault
cwdNo.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

C2.6/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. 'Show' weakly implies a read, but the name 'git_branch' in Git semantics also covers branch creation and deletion, and the description never clarifies whether this tool only lists or can mutate. Nothing is said about permissions, output shape, or whether remote-tracking branches are included.

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

Conciseness3/5

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

The single sentence is front-loaded and wastes no words, which is good, but the terseness is under-specification rather than economy given the tool's unannotated read/write ambiguity.

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

Completeness2/5

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

With no annotations, no output schema, and an undocumented parameter, the definition leaves too much unresolved for an agent to call it confidently. It should at minimum state that it is read-only, that cwd is the repository directory, and whether remotes are included.

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

Parameters2/5

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

Schema description coverage is 0% for the single 'cwd' parameter, so the description must compensate and does not. It says nothing about what 'cwd' means (the working directory the Git command runs in) or how the default '.' is interpreted.

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 ('Show') and resource ('branches') plus the tracking-info detail, so the agent knows this is a branch-listing operation. It falls short of 5 because it never distinguishes itself from the nearby git_status and git_log siblings, which an agent could easily confuse with branch inspection.

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 guidance on when to use this versus git_status, git_log, or git_diff, nor any note about local versus remote branches. The agent must infer the appropriate context entirely from the tool name.

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