Skip to main content
Glama

kilo_create_worktree

Create an isolated git worktree with a new branch to prevent file collisions during parallel coding tasks, enabling independent implementation runs on separate components.

Instructions

Create an isolated git worktree under .kilo/worktrees/<branch_name> (runs git directly, not Kilo). Each worktree gets its own new branch, so parallel kilo_implement runs on independent components never collide on files.

Prefer passing isolation='worktree' directly to kilo_implement instead of calling this separately — one step instead of two, and harder to forget. Use this standalone tool when you need the worktree before deciding what to delegate into it, or want a worktree kilo_implement doesn't manage.

Fails if the branch already exists — pick a fresh branch name per task.

Also registers the new worktree in .kilo/agent-manager.json (best-effort) so it can appear in the Kilo Agent Manager UI. There is no live sync with a running VS Code extension window — see kilo_implement's isolation parameter description for the caveat.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "branch_name": "<branch_name>"
    },
    "name": "kilo_create_worktree"
  }
}

Input Schema

NameRequiredDescriptionDefault
base_branchNoOptional base branch (default: current branch)
branch_nameYesName of the new branch and worktree directory
working_directoryNoBase repository directory

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/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 so well: it discloses the git-level mechanism, the on-disk location, the hard failure when the branch already exists ('pick a fresh branch name per task'), the best-effort registration in .kilo/agent-manager.json, and the absence of live sync with a running VS Code window. The gaps are lifecycle details — how to remove or recover a partially created worktree, and whether anything is left behind on failure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the operation and path, then the routing guidance, then failure semantics, then side effects — a sensible ordering. It runs four short paragraphs and the final VS Code sync caveat is somewhat deflected to another tool's description rather than stated inline, which is minor bloat/deferral.

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?

An output schema exists, so return-value explanation is correctly omitted, and the description covers mechanism, failure, and side effects for a mutating filesystem tool with no annotations. What's missing is the teardown path — an agent is told how to create a worktree but not that kilo_cleanup (or similar) removes it, which matters for a tool that leaves directories on disk.

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 coverage is 100%, so the baseline is 3, and the description adds only the freshness constraint on branch_name plus a brief restatement that it names both the branch and directory. base_branch and working_directory are never mentioned in the description, so it adds little 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 a specific verb and resource ('Create an isolated git worktree') plus the exact path template '.kilo/worktrees/<branch_name>', and immediately clarifies it runs git directly rather than going through Kilo. That parenthetical alone distinguishes it from the sibling kilo_implement path an agent might otherwise reach for.

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 the preferred alternative (pass isolation='worktree' to kilo_implement, 'one step instead of two') and then names the two conditions that justify the standalone tool: needing the worktree before deciding what to delegate, or wanting a worktree kilo_implement doesn't manage. Both the when and the when-not are present.

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