Skip to main content
Glama

git_branch

List local branches of a place's mirror repo with the current branch marked, or create and switch to a new branch from the current commit; uncommitted changes carry over.

Instructions

List the local branches of a place's mirror repo (current one marked *), or create a new branch from the current commit and switch to it. Listing is read-only; creating is blocked in read-only mode. Uncommitted changes carry over to the new branch.

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

Input Schema

NameRequiredDescriptionDefault
nameNoName of a new branch to create and switch to. Omit to list branches.
placeNoTarget place (PlaceId or project name) whose mirror repo to use. Defaults to the bound/sole connected place.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.1
    • addedInput schema / properties / name / description
      Added value: +"Name of a new branch to create and switch to. Omit to list branches."
    • changedInput schema / properties / place / description
      Previous value: -"Target place (PlaceId or project name); defaults to the bound/sole place"New value: +"Target place (PlaceId or project name) whose mirror repo to use. Defaults to the bound/sole connected place."
  2. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false and destructiveHint=false, and the description adds substantive behavior beyond that: listing is a read-only path, creation is refused under read-only mode, and uncommitted changes carry over to the new branch. That last point is exactly the kind of side-effect disclosure annotations cannot express; only the lack of return-format or name-collision behavior keeps it from a 5.

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?

Three short sentences, front-loaded with the listing case, then the creation case, then the side effects and read-only caveat. No filler, no repetition of the tool name, and the clause about uncommitted changes is placed where a caller deciding to create will see it.

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?

With only two optional parameters, no output schema, and annotations covering safety, the description does nearly all the remaining work: both modes, the read-only gate, and the working-tree carry-over. It stops short of describing what listing returns or how creation fails, which would complete the picture for a mutating git operation.

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 coverage is 100%, and both parameters already carry inline documentation including the 'omit to list' semantics for name. The description reinforces the mode switch but adds no new syntax, format, or defaulting detail beyond the schema, so the baseline 3 applies.

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

Purpose5/5

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

The description names the resource (local branches of a place's mirror repo) and both verbs precisely: list branches, or create-and-switch to a new branch from the current commit. It even specifies the listing marker ('*' on the current branch), which lets an agent distinguish this from git_log or git_status without opening a schema.

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 two modes are clearly delineated and the description states that creating is blocked in read-only mode, which is genuine when-to-use context. However, it offers no explicit routing against siblings (e.g., when to inspect history with git_log instead) and no prerequisites such as required branch name validity or existing-branch collision handling.

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