Skip to main content
Glama

git_checkout

Switch Git branches or restore working tree files to manage version control operations within repositories.

Instructions

Switch branches or restore working tree files

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
branchYesBranch name to checkout
createNoCreate a new branch
forceNoForce checkout (discard local changes)
pathNoRepository path (optional, defaults to current directory)
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'switch branches' and 'restore working tree files' imply mutation operations, the description doesn't disclose important behavioral traits like whether this tool modifies the working directory, what happens to uncommitted changes, whether it requires a clean working state, or what happens on failure. For a git operation that can potentially discard local changes, this is a significant gap in transparency.

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?

The description is extremely concise with just two phrases that capture the core functionality. It's front-loaded with the primary purpose and wastes no words. Every element earns its place by communicating distinct aspects of the tool's functionality in minimal language.

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?

Given that this is a git operation tool with no annotations, no output schema, and 4 parameters (including potentially destructive ones like 'force'), the description is insufficiently complete. It doesn't address the mutation nature of the operation, potential side effects, error conditions, or what constitutes successful execution. For a tool that can 'force checkout (discard local changes)' as indicated in the schema, the description should provide more contextual warning or guidance.

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?

The input schema has 100% description coverage, providing clear documentation for all 4 parameters. The description doesn't add any parameter-specific information beyond what's already in the schema, which is acceptable given the comprehensive schema coverage. The baseline score of 3 reflects that the schema adequately documents parameters without needing additional description support.

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 clearly states the tool's purpose with specific verbs ('switch branches' and 'restore working tree files'), which directly corresponds to the git checkout command functionality. It distinguishes this tool from sibling git tools like git_branch, git_commit, or git_status by focusing specifically on branch switching and file restoration operations.

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?

The description provides no guidance on when to use this tool versus alternatives. While it mentions two functions (branch switching and file restoration), it doesn't clarify when to choose this over other git operations or when not to use it. There's no mention of prerequisites, dependencies, or typical use cases beyond the basic functionality.

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/proofmath-owner/ai-filesystem-mcp'

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