Skip to main content
Glama
jesspig

git-mcp-server

by jesspig

git_worktree

Destructive

Manage linked worktrees to check out multiple branches simultaneously in separate directories, avoiding disruptive switches and the need to stash. Supports add, list, and remove operations.

Instructions

Manage linked worktrees: list, add, or remove them. Use this to check out multiple branches simultaneously in separate directories when switching back and forth is disruptive, or to work on a second branch without stashing. Does NOT switch the main working tree — use git_checkout for that; use git_branch to see which branches can be added. Best for: checking out multiple branches simultaneously. Returns: worktree listing, or git worktree output; remove requires confirmed=True and add refuses non-empty paths.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
branchNoBranch to check out in the new worktree
confirmedNoExplicit confirmation for worktree removal
operationNoOne of: list, add, removelist
repo_pathNoPath to the git repository, defaults to '.' (the server working directory).
worktree_pathNoPath for the new or existing linked worktree
Behavior5/5

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

Beyond the annotations (destructiveHint=true), the description discloses specific behavioral traits: it does not switch the main working tree, removal requires confirmed=True, and add refuses non-empty paths. These are critical for safe operation and are not present in the schema or annotations.

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 compact yet information-dense, with clear front-loading of purpose and structured labels for 'Best for' and 'Returns.' Every sentence earns its place without repetition or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With multiple operations, no output schema, and destructive behavior, the description covers return values, operation-specific quirks, and prerequisites. It provides a complete mental model for an agent to invoke the tool correctly.

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 coverage is 100%, so the baseline is 3, but the description adds meaningful parameter semantics: 'remove requires confirmed=True' clarifies the confirmed parameter, and 'add refuses non-empty paths' explains worktree_path behavior. This adds value 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?

The description opens with 'Manage linked worktrees: list, add, or remove them,' a specific verb+resource combination. It clearly distinguishes from siblings by stating 'Does NOT switch the main working tree — use git_checkout for that; use git_branch to see which branches can be added.'

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use the tool ('check out multiple branches simultaneously,' 'work on a second branch without stashing') and names alternatives (git_checkout, git_branch). This goes beyond implied context to give actionable guidance.

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/jesspig/git-mcp-server'

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