Skip to main content
Glama

Manage a task's worktree

codex_worktree

Commit completed task work to its isolated branch or remove the worktree, optionally discarding uncommitted changes with force.

Instructions

Commit or remove the isolated git worktree of a task delegated with isolation "worktree". "commit" records the work on the task branch and reports the merge command; the router never merges into the user branch itself. "remove" tears the worktree down and refuses to discard uncommitted work unless forced.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNoFor "remove": discard uncommitted changes in the worktree.
actionYes"commit" the work onto the task branch, or "remove" the worktree.
taskIdYesTask whose worktree to act on.
messageNoCommit message. Defaults to the task description.
Behavior4/5

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

With no annotations provided, the description carries the full disclosure burden and does well: it explains that 'commit' records work and reports a merge command without merging into the user branch, and that 'remove' tears down the worktree and refuses to discard uncommitted work unless forced. It leaves out post-commit worktree state and error conditions, but the critical side effects and safety behavior are transparent.

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?

Three sentences with no filler: the first states the overall purpose, the second explains commit semantics, the third explains remove semantics including the forced flag. Each sentence earns its place and the key scoping constraint is front-loaded.

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 provides the essential operational context for a two-action tool: target resource, per-action behavior, and safety defaults. It does not describe the full return value shape or error handling, and there is no output schema to supplement, but the available information is sufficient for selection and basic invocation.

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. The description adds meaning beyond the schema by explaining what 'commit' produces (a merge command) and that 'force' overrides a refusal to discard uncommitted work. This helps the agent reason about when to use the optional force and message params, though the message param is only documented in 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 names two specific actions (commit, remove) applied to a specific resource (the task's isolated git worktree), and scopes it to tasks delegated with isolation "worktree". This clearly distinguishes it from sibling tools like codex_restore or codex_checkpoints, which handle different task lifecycle concerns.

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?

The description clearly states the tool applies only to tasks delegated with isolation "worktree", giving a concrete condition for use. It does not explicitly name alternatives or list when-not-to-use scenarios, but the isolation qualifier provides enough guidance for an agent to select it correctly.

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/Marczelloo/agent-router-mcp'

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