Skip to main content
Glama

Git Create Branch

git_create_branch

Creates and checks out a new Git branch in a chosen repository so users can isolate work without manual branch switching.

Instructions

Create and switch to a new git branch (git checkout -b).

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

Input Schema

NameRequiredDescriptionDefault
repo_pathNoPath to the git repository..
branch_nameNoName for the new branch.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden; it does disclose the key side effect that the working tree switches to the new branch and pins the behavior to 'git checkout -b'. It omits important edge behavior: what happens if the branch already exists, whether uncommitted changes block the switch, or whether it mutates the repo at all on failure.

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?

A single front-loaded sentence with zero padding, and the parenthetical git equivalent adds precision without waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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, and the tool is simple with only two parameters. However, for a state-mutating git operation the description should mention failure conditions (branch exists, dirty tree) to be fully complete.

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 description coverage is 100%, so both parameters (repo_path, branch_name) are already documented in the schema, establishing a baseline of 3. The description adds no extra semantics such as name-format rules or what the empty default branch_name implies.

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?

States a specific verb and resource ('Create and switch to a new git branch') and even names the exact git equivalent, so the operation is unambiguous. It does not differentiate itself from the sibling git_branch, which an agent might reasonably confuse with branch creation.

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?

There is no guidance on when to use this versus git_branch (likely listing/inspecting branches) or the general workflow tools like git_commit. The only implied usage comes from the verb 'create', leaving the agent to infer context and prerequisites.

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