Skip to main content
Glama

git_checkout

Destructive

Switch to an existing Git branch, or create and switch to a new branch, for safe branch management without force or discard modes.

Instructions

Switch to an existing Git branch, or create and switch to a new branch. Force/discard modes are intentionally not exposed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoGit repository directory; defaults to the workspace.
branchYes
createNo
Behavior4/5

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

Annotations mark `destructiveHint: true`, and the description adds a specific safety limitation: force/discard modes are intentionally not exposed, so the agent can expect failures rather than destructive overwrites. This is valuable context beyond the generic annotation and does not contradict it.

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?

Two concise sentences, with the core action front-loaded and the safety limitation in a single clause. Every word earns its place; no fluff or repetition.

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?

For a simple 3-parameter tool, the description covers the core action and an important behavioral guardrail. It doesn't describe return output or failure modes, but no output schema exists and git checkout behavior is standard. A mention of uncommitted changes would make it fully complete, but it's already largely sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 33% (only `path` is described). The description compensates by naming `branch` as the target and explaining `create` through 'create and switch to a new branch.' It doesn't detail the `create` boolean's default or behavior when false, but it adds meaning beyond the schema.

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?

States a clear verb ('Switch') and resource ('Git branch'), explicitly covering two modes: switching to an existing branch and creating a new one. It distinguishes itself from sibling `git_branch` by describing the act of switching. The note about force/discard modes sharpens the scope.

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 description implies when to use the tool (when changing branches) but does not mention alternatives or exclusions. Unlike a stronger definition, it doesn't name a sibling tool or state when not to use it. The only limitation is about force/discard modes, not about choosing between tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/JonusNattapong/ChatGPTMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server