Skip to main content
Glama

Git Branch

git_branch

List local Git branches for a repository to inspect available branches before switching, merging, or comparing work.

Instructions

List local branches (git branch).

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
repo_pathNoPath to the git repository..

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It implies a read-only list operation but does not state that nothing is mutated, does not mention how missing/invalid repos are handled, and gives no sense of result shape or ordering (an output schema exists, which lightens the return-value burden, but not the operational one).

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?

One short sentence, front-loaded with the action and resource, with zero filler. It is efficient, though the extreme terse-ness crosses slightly into under-specification rather than pure conciseness.

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

Completeness3/5

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

The tool is simple (one optional parameter, output schema present), so the description is close to sufficient for correct invocation. However, with no annotations, it leaves the read-only nature, error behavior, and local-vs-remote scope boundary for the agent to assume.

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 100% and the single repo_path parameter is documented in the schema with a default of ".". Per the baseline rule for high coverage, a 3 applies; the description adds nothing about repo_path resolution, relative-path behavior, or defaults.

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?

States a specific verb and resource — "List local branches" — and even names the underlying git command (git branch) for disambiguation. The word "local" implicitly separates it from remote-branch or branch-creation operations, but it never names git_create_branch or git_status as siblings, so differentiation is inferred rather than stated.

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 when-to-use guidance, no prerequisites (e.g. that the repo must exist at repo_path), and no mention of alternatives such as git_create_branch for creating a branch or git_status for current-branch context. The agent must infer usage 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.