Skip to main content
Glama

Git Branch Tools

git_branches
Destructive

Manage Git branches by listing, creating, deleting, renaming, checking out, setting upstreams, or viewing recent branches in a local repository.

Instructions

Branch tool. Use action=list|create|delete|rename|checkout|set_upstream|recent for branch workflows.

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

Input Schema

NameRequiredDescriptionDefault
allNo
refNo
nameNo
countNo
forceNo
actionNolist
branchNo
createNo
from_refNo
new_nameNo
old_nameNo
upstreamNo
repo_pathNoAbsolute path to the local Git repository. If omitted, falls back to the server default set via the GIT_REPO_PATH environment variable or --repo-path CLI argument.
response_formatNoOutput format for the response.markdown

Output Schema

NameRequiredDescriptionDefault
outputNo
branchesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

C2.4/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, and idempotentHint=false, so the safety profile is supplied externally. The description adds nothing beyond that: it does not say which of the seven actions are destructive (delete clearly is), that force bypasses safety checks, or whether checkout fails on uncommitted changes. With 14 parameters and mixed read/write actions, this silence is a meaningful gap.

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?

It is short, front-loaded, and free of filler, which is good structurally. But the brevity here is under-specification rather than discipline — the single sentence spends its words repeating the schema enum instead of describing behavior.

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?

This is a multi-action, 14-parameter tool with destructive capability, and an output schema exists so return values need not be explained. Even so, the description never maps parameters to actions or distinguishes read actions (list, recent) from destructive ones (delete, rename, checkout with force), leaving an agent to infer call shape from the schema alone.

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 only 14% across 14 parameters, so the description bears the burden of explaining them and does not. The action values it lists are already the schema enum, so it adds no meaning; parameters such as force, from_ref, old_name/new_name, upstream, all, and count are left entirely unexplained as to which action consumes them.

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

Purpose3/5

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

"Branch tool" largely restates the name, but the following clause enumerates the seven action modes (list/create/delete/rename/checkout/set_upstream/recent), which tells an agent the resource is branches and that operations are action-dispatched. It never states in plain language what the tool does (manage local branches) or how it differs from siblings like git_workflow or git_merge, so the purpose is implied 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?

"for branch workflows" is the only usage framing and it is circular — it gives no condition for choosing this tool over git_status, git_workflow, or git_remotes, and no when-not guidance. There is no mention of prerequisites such as needing a valid repo_path or clean working tree before checkout/rename.

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