Skip to main content
Glama

git_branch

Creates, manages, merges, rebases, stashes, tags, and safely deletes Git branches, using confirmation gating for destructive branch removal.

Instructions

Git branch operations — branch lifecycle, merge, rebase, stash, tag.

For core operations (status, log, commit, push) use git_core. For admin operations (remote, reset, clean, submodule) use git_admin. branch_delete needs confirm=True + confirm_token (red-shelf gate).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "operation": "<operation>"
    },
    "name": "git_branch"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNo
branchNo
confirmNo
messageNo
tag_nameNo
operationYes
repo_pathNo
stash_indexNo
tag_messageNo
confirm_tokenNo
source_branchNo
stash_messageNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.5

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full disclosure burden. It usefully reveals one safety behavior — branch_delete requires confirm=True plus a confirm_token ('red-shelf gate') — which is real context an agent would otherwise miss. However, it says nothing about the `force` param's destructive implications, which operations mutate shared state (rebase, merge), whether operations are reversible, or the consequences of an unconfirmed delete beyond the gate itself.

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?

Four short lines, front-loaded with the resource scope, then sibling routing, then the safety caveat. Every sentence earns its place and nothing is padded.

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?

An output schema exists, so return values need not be explained. But for a 12-parameter, multi-operation tool with zero annotation coverage, an agent still cannot determine which `operation` values are valid or how most parameters map to operations — the definition is materially incomplete for correct invocation.

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 0% across 12 parameters, so the description must compensate and largely fails to. Only `confirm`/`confirm_token` are given any meaning, tied to branch_delete; `force`, `branch`, `source_branch`, `stash_index`, `message`, `tag_name`, `tag_message`, `stash_message`, and `repo_path` all remain unexplained in both schema and prose. The single required `operation` string has no enum and no documented values at all.

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 first line names a specific resource and scope ('Git branch operations — branch lifecycle, merge, rebase, stash, tag'), and explicitly separates this tool from git_core and git_admin. What is missing is the vocabulary of valid `operation` values, so the agent knows the domain but not the exact verbs it can request. 'Branch lifecycle' is a vague catch-all that does little work.

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 gives explicit routing rules: core operations (status, log, commit, push) go to git_core, admin operations (remote, reset, clean, submodule) go to git_admin. That is genuine alternative-naming guidance. It does not tell the agent how to pick among this tool's own operations, nor when *not* to use it within its stated scope.

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