Skip to main content
Glama

git_worktree_remove

Remove a Git worktree when a ticket is complete. Safely deletes the directory and blocks removal if uncommitted changes exist unless force is enabled.

Instructions

End a hop (remove git worktree). Safely removes the worktree directory. Refuses if there are uncommitted changes unless force=true. Use when done with a ticket.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugNoCombined with ticket to identify specific worktree.
forceNoForce removal even if worktree has uncommitted changes.
pruneNoAlso prune the worktree reference from git.
branchNoBranch name to find and remove the worktree for.
dryRunNoIf true, return what would be removed without actually removing it. Shows dirty status and branch info.
ticketNoTicket ID to find and remove the worktree for.
repoPathNoAny path inside the git repository.
worktreePathNoDirect path to the worktree to remove.
allowMainWorktreeNoAllow removing the main worktree (dangerous).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral burden. It discloses the key safety refusal on uncommitted changes and the force override, but omits other important traits such as irreversibility, permissions, and the danger of removing the main worktree.

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?

Four short sentences, front-loaded with the core action and safety condition. No filler; every sentence contributes.

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

Completeness3/5

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

For a destructive 9-parameter tool with no annotations or output schema, the description covers the essential refusal behavior and usage trigger. It still leaves significant gaps around side effects, alternatives, and dangerous modes like allowMainWorktree.

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 description coverage is 100% for all 9 parameters, so the schema already documents each parameter. The description only repeats the force condition, adding no meaning beyond the schema; baseline 3.

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?

States a specific verb and resource ('remove git worktree') and clarifies scope ('End a hop'). However, it does not explicitly distinguish this from sibling tools like git_worktree_clean or hop_end, leaving some ambiguity.

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

Usage Guidelines4/5

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

Provides a clear usage context: 'Use when done with a ticket.' It does not mention when not to use it or name alternative tools, but the context is explicit.

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