Skip to main content
Glama

worktree_create

Creates an isolated git worktree with a new branch so Cursor Agent can work without affecting your current directory. Fetches the base remote first and symlinks node_modules for Node/TS repos to avoid reinstalling dependencies.

Instructions

Crea un git worktree aislado (+ rama nueva) para que cursor-agent trabaje sin tocar tu working directory actual. Hace git fetch del remoto de base primero. Si el repo es Node/TS, symlinkea node_modules del repo original (no reinstala nada).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseNoPunto de partida (default: origin/main).origin/main
fetchNoHacer `git fetch` del remoto de base antes de crear (default: true).
branchYesNombre de la rama nueva a crear para este trabajo.
repo_pathYesRuta absoluta al repo git (ej. /Users/tu/Desktop/plaxp/frontend).
worktree_pathNoRuta destino del worktree. Default: ~/.cursor-worktrees/<repo>--<rama>.
link_node_modulesNoSymlinkear node_modules del repo original (default: true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does disclose important traits: it performs git fetch first, creates a new branch/worktree, symlinks node_modules for Node/TS, and explicitly avoids reinstalling. It does not mention output, failure modes, or cleanup, but the core side effects are clear.

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 front-load the purpose and then add the two most important behavioral details (fetch and node_modules symlink). No filler or repetition of schema fields.

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?

The description covers the operation's purpose, primary side effects, and the isolation benefit, while the schema covers all parameter defaults. It does not describe return values or conflict behavior (e.g., if the branch already exists), but that is a minor gap for a creation tool with no output schema.

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?

All 6 parameters are documented in the schema (100% coverage), so the baseline is 3. The description adds value by clarifying that 'fetch' runs before creation, 'base' supplies the remote to fetch, and 'link_node_modules' symlinks the original node_modules instead of reinstalling.

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 uses a specific verb and resource: it creates an isolated git worktree plus a new branch so an agent can work without touching the current working directory. This clearly separates it from siblings like worktree_list and worktree_remove.

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?

It states the intended use ('para que cursor-agent trabaje sin tocar tu working directory actual') and key preconditions such as fetching base and symlinking node_modules for Node/TS repos. It does not explicitly name alternatives or edge cases where this tool should not be used, so it stops short of a 5.

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