Skip to main content
Glama

Git Branch

git_branch

Manage Git branches by listing, creating, deleting, or renaming them. View current branch status and filter by merge status or remote origin to organize repositories.

Instructions

Manage branches: list all branches, show current branch, create a new branch, delete a branch, or rename a branch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoPath to the Git repository. Defaults to session working directory set via git_set_working_dir..
operationNoThe branch operation to perform.list
nameNoBranch name for create/delete/rename operations.
newNameNoNew branch name for rename operation.
startPointNoStarting point (commit/branch) for new branch creation.
forceNoForce the operation, bypassing safety checks.
allNoFor list operation: show both local and remote branches.
remoteNoFor list operation: show only remote branches.
mergedNoFor list operation: show only branches merged into HEAD (true) or specified commit (string).
noMergedNoFor list operation: show only branches not merged into HEAD (true) or specified commit (string).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
successYesIndicates if the operation was successful.
operationYes
branchesNoList of branches (for list operation).
currentBranchNoName of current branch.
messageNoSuccess message for create/delete/rename operations.
Behavior3/5

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

The annotation indicates readOnlyHint: false, and the description corroborates this by listing mutating operations (create, delete, rename). It adds value by specifying which mutations are possible, but does not elaborate on safety implications, failure modes, or the specific effects of the force parameter beyond the schema description. Additional context about unmerged branch deletion behavior or rename conflicts is absent.

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 consists of a single, efficiently structured sentence that front-loads the general capability ('Manage branches') followed by specific operations. No words are wasted on tautology or redundant restatement of the tool name. The colon-separated list format provides excellent information density.

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?

Given the comprehensive input schema (100% coverage) and the existence of an output schema, the description appropriately serves as a high-level capability summary rather than exhaustive documentation. It successfully enumerates all five supported operations from the enum. However, it could enhance completeness by explicitly noting the destructive nature of delete operations given the minimal annotations.

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?

With 100% schema description coverage, the structured data already documents all 10 parameters comprehensively. The description mirrors the operation enum values but does not augment the schema with additional semantic context, syntax examples, or cross-parameter relationships. It maintains the baseline score appropriate for high-coverage schemas.

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 enumerates five specific operations (list, show-current, create, delete, rename) on the resource 'branches', providing clear functional scope. While 'Manage' is slightly generic, the colon-delimited list effectively specifies the tool's capabilities. However, it lacks explicit differentiation from sibling tools like git_checkout that may overlap in branch creation functionality.

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 description lists the available operations but provides no explicit guidance on when to use this tool versus alternatives like git_checkout for branch creation or switching. There are no 'when-not' exclusions or prerequisites mentioned for destructive operations like delete. Usage guidance remains implied through the operation enumeration rather than explicit recommendation.

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/cyanheads/git-mcp-server'

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