Skip to main content
Glama
mcp-server-git

mcp-server-git

by Arnabdaz

git_switch_create

Switch to a Git branch or create it from an optional base branch to start or continue work on the correct branch.

Instructions

Switches to a new branch or creates it from an optional base branch

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": {
      "repo_path": "<repo_path>",
      "branch_name": "<branch_name>"
    },
    "name": "git_switch_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
repo_pathYes
base_branchNo
branch_nameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.2

TDQS

C2.9/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 behavioral burden, and it only covers the switch/create duality. It says nothing about what happens with uncommitted changes, whether it fails when the branch already exists, whether HEAD is moved, or what errors look like — all critical for a working-tree mutation.

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 compact sentence with the action front-loaded and no filler. It is efficient, though the compressed 'or creates it' wording is slightly ambiguous on first read.

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?

With no annotations and no output schema, the description must cover behavior on its own, and it omits failure modes, state changes, and parameter documentation. The one clause about the optional base branch is the only substantive addition beyond the tool name.

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%, so all three parameters depend on the description for meaning. The phrase 'optional base branch' does clarify that base_branch is optional and only relevant when creating, but repo_path and branch_name receive no semantic elaboration, and the interaction between branch_name and base_branch is left implicit.

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 pairs a specific verb ('switches to'/'creates') with a specific resource ('a new branch'), so an agent knows this is a combined switch-and-create operation. It does not differentiate from siblings like git_create_branch or git_checkout, leaving the agent to infer that this tool does both in one step.

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 'or creates it' phrasing implies the tool is appropriate when the branch may not yet exist, which is useful context. However, it never states when to prefer this over git_create_branch or git_checkout, nor any preconditions such as a clean working tree.

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