Skip to main content
Glama

git_branch

Checks out an existing branch or creates a new one in a local repository, so you can switch context or start isolated work.

Instructions

Checkout or create a branch in a local repo

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": {
      "dir": "<dir>",
      "name": "<name>"
    },
    "name": "git_branch"
  }
}

Input Schema

NameRequiredDescriptionDefault
dirYes
nameYes
createNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.7/5.0
Behavior2/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, yet it does not disclose failure behavior (branch exists / branch missing), where a new branch is created from, or whether local modifications carry over. It states the mutation but nothing about its consequences or error modes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with zero filler; the mode distinction is placed early. It is efficient, though the brevity edges toward under-specification rather than economy.

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?

For a three-parameter mutation tool with no annotations, no output schema, and zero schema descriptions, the description leaves too much undefined: parameter meaning, preconditions, and outcomes. An agent could pick the right tool but would likely have to guess at invocation details.

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 three parameters, and the description only obliquely gestures at 'create' through the phrase 'or create'. The required 'dir' and 'name' parameters get no explanation of format (absolute vs relative path, branch naming rules), so the description does not compensate for the schema gap.

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 names a specific verb pair (checkout/create) and resource (branch) scoped to a local repo, which is enough for an agent to distinguish it from commit, push, or clone siblings. It stops short of stating how the two modes relate to the 'create' flag.

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 when-to-use guidance beyond the implied choice between checkout and create, and no prerequisites such as whether the branch must already exist, whether the working tree must be clean, or what happens with uncommitted changes. The agent must infer all preconditions.

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