Skip to main content
Glama

git_branch

Read-only

List local Git branches, optionally including remote branches, showing current branch and upstream tracking details.

Instructions

List local Git branches and optionally remote branches with current/upstream metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allNoInclude remote branches.
pathNoGit repository directory; defaults to the workspace.
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, covering the safety profile. The description adds useful scope information (local vs optional remote) and the presence of current/upstream metadata, but does not describe output format, pagination, or error behavior. This is acceptable given the simple read-only nature of the tool.

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?

The description is a single sentence with no filler, front-loading the core action and resource. It conveys the important optional behavior ('optionally remote branches') concisely and is easy to parse.

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 simple read-only listing tool with two optional parameters and no output schema, the description covers the essential behavior and what metadata is returned. The main gap is a precise description of the output format, but the description provides enough for an agent to call the tool correctly.

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?

The input schema already covers both parameters fully with descriptions: 'all' means include remote branches, and 'path' defaults to the workspace. The description's phrase 'optionally remote branches' reinforces the 'all' parameter but does not add substantial meaning beyond the schema, so a baseline score of 3 is appropriate.

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

Purpose5/5

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

The description names a specific verb ('List'), resource ('Git branches'), and scope ('local' and optionally 'remote'), plus the metadata returned ('current/upstream'). This clearly distinguishes it from sibling git tools such as git_log, git_status, or git_diff, which operate on commits or working-tree state.

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

Usage Guidelines4/5

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

The description clearly conveys when this tool is appropriate: to list branches, including remote ones when requested. It does not explicitly name alternatives or exclusion criteria, but the tool's purpose is unambiguous enough that an agent can select it over the listed git siblings without confusion.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/JonusNattapong/ChatGPTMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server