Skip to main content
Glama

use_worktree

Switch this server to another git worktree of the same repository, for the rest of this session: every later call reads and writes that checkout.

Instructions

Switch this server to another git worktree of the same repository, for the rest of this session: every later call reads and writes that checkout. Call it right after creating the worktree you will implement in, so initiative edits land in that branch's commit. With no path (or the original checkout's path), switch back — do that after merging, before removing the worktree. Returns the checkout now in use.

Input Schema

NameRequiredDescriptionDefault
pathNoThe worktree's folder; omit to return to the checkout the server started in.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.6.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does: it discloses that the switch persists for the entire session and that every later call reads and writes the new checkout, plus the reversal condition and the return value. This is exactly the side-effect information an agent needs for a stateful, session-mutating tool.

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 what the tool does, followed by when to call it in each direction. No filler, and the durable-session constraint is stated first where it matters most.

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?

For a single-optional-parameter stateful tool with no annotation or output schema support, the description covers purpose, timing, reversal, persistence, and the return value. Nothing needed to invoke it correctly is missing.

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 baseline is 3, but the description adds semantics beyond the schema: it explains that passing the original checkout's path is equivalent to omitting path, which the schema's wording does not state. That extra behavioral meaning for the sole parameter earns above baseline.

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 specific verb (switch) and resource (this server's git worktree) plus the scope ('of the same repository, for the rest of this session'), which no sibling tool covers. An agent can distinguish it from create/update/tidy without opening the schema.

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?

Gives explicit timing rules: call it right after creating the worktree so edits land in that branch's commit, and switch back after merging before removing the worktree. Both the when and the sequencing relative to other operations are spelled out.

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