Skip to main content
Glama

merge_worktree

Merge changes from an isolated git worktree back into the main workspace after a subgoal task is accepted. On success, updates status to merged; on failure, preserves worktree for manual inspection.

Instructions

v1.0.0: Merge an isolated git worktree's changes back into the main workspace. Use after a subgoal task (created with isolate_worktree=true) is accepted. Updates worktree_status.json to status='merged'. Merge failures do NOT delete the worktree (preserved for manual inspection).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_pathYesMain workspace repository path inside workspaceRoot.
worktree_idYesWorktree ID (wt_...) from create_subgoal_task.
Behavior4/5

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

Discloses that it updates worktree_status.json to 'merged' and that merge failures preserve the worktree for manual inspection. Without annotations, this is good but could mention additional behavior like permission requirements or commit creation.

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 sentences plus version number, front-loaded with purpose and usage. No extraneous information.

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?

Covers purpose, usage timing, state changes, and failure behavior. Lacks any mention of return value, but no output schema exists. Nearly complete for a simple tool.

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% for both parameters, so baseline is 3. Description does not add extra meaning beyond the schema descriptions.

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?

Clearly states verb 'Merge' and resource 'isolated git worktree's changes back into the main workspace'. Distinguishes from siblings like discard_worktree by focusing on merging accepted work.

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?

Explicitly says 'Use after a subgoal task (created with isolate_worktree=true) is accepted', providing clear context. Lacks explicit exclusions or alternatives.

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/jiezeng2004-design/PatchWarden'

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