Skip to main content
Glama

git_branch

List, create, or switch Git branches to start feature work and avoid protected-branch commit refusal.

Instructions

List branches, or create / switch to one. Creating a feature branch is the normal first step before making changes, since commits to protected branches are refused.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromNoBase ref for a new branch. Default: the current HEAD.
nameNoBranch to create or switch to. Omit to list branches.
createNoCreate the branch. Default false (switch to an existing one).
workspaceNoWorkspace alias. Defaults to the active workspace.
Behavior3/5

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

With no annotations, the description carries the burden of behavioral disclosure. It mentions the protected branch refusal, a useful constraint, and implies mutation via create/switch. But it does not disclose side effects of switching (e.g., working tree changes), failure modes, or output format, leaving gaps.

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 two sentences, front-loaded with the core purpose. The second sentence adds valuable workflow context about protected branches without any waste. Every sentence earns its place.

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 tool with no output schema and no annotations, the description covers the main purpose and gives important workflow context. It does not explain return values or edge cases like switching to a nonexistent branch without create=true, so it is not fully complete, but it is above the minimum viable.

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 coverage is 100% and every parameter has a description. The tool description does not add parameter-level semantics beyond the schema, so the baseline of 3 applies.

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 clearly states the tool's function: 'List branches, or create / switch to one.' This specific verb+resource combination distinguishes it from sibling tools like git_commit, git_status, and git_log, making the purpose unambiguous.

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?

It provides clear context: 'Creating a feature branch is the normal first step before making changes, since commits to protected branches are refused.' This tells the agent when to use the tool (before making changes) and why. However, it does not explicitly mention alternatives or when not to use it, so it misses the 5 threshold.

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/zcrossoverz/repo-bridge'

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