Skip to main content
Glama

apply_task_patch

Apply isolated worktree changes back into the primary workspace using a patch or merge strategy for a specified task.

Instructions

Apply the isolated worktree changes back into the primary workspace.

Only patch and merge are exposed over MCP. The copy strategy is destructive and remains a CLI-only operation.

Input Schema

NameRequiredDescriptionDefault
task_idYes
strategyNopatch

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden of disclosure. It usefully flags that the copy strategy is destructive and CLI-only, but for a mutation tool it omits critical behavior: what happens to the worktree after applying, how merge conflicts surface, and whether the operation is reversible.

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?

Two short sentences, front-loaded with the core action and followed by the one constraint that matters. The reStructuredText double-backtick markup is slightly noisy but not wasteful, and nothing is repeated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 values need not be described. Still, for a no-annotation mutation tool with an entirely undocumented parameter schema, the description should say more about side effects and failure modes before an agent commits to applying a patch.

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 0%, so the description must compensate. It does add real meaning for 'strategy' by revealing the two accepted values and excluding copy, but 'task_id' is left completely undefined in both schema and description, and the difference between patch and merge is never explained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource: apply isolated worktree changes back into the primary workspace. That distinguishes it from siblings like dispatch_task and cancel_task without needing to name them. It stops short of a 5 because it never explicitly contrasts itself with any sibling tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It constrains the strategy argument by stating only patch and merge are available over MCP, which tells the agent what not to pass. However, it never states the precondition for calling it (for example, that a task must have completed with worktree changes) or what to use instead when the conditions aren't met.

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