Skip to main content
Glama

agy_cleanup

Removes a task's worktree and record while preserving its agy/<task_id> branch by default; set delete_branch to true only after merging or cherry-picking the work.

Instructions

Remove a task's worktree and its record. The agy/<task_id> branch is kept unless delete_branch is true, so merge or cherry-pick it first if you want to keep the work.

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": {
      "task_id": "<task_id>"
    },
    "name": "agy_cleanup"
  }
}

Input Schema

NameRequiredDescriptionDefault
task_idYestask_id returned by agy_task.
delete_branchNoAlso delete the agy/<task_id> branch. Defaults to false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations present, the description carries the full burden and does disclose the key behavioral facts: both the worktree and the record are destroyed, while the branch survives by default. Gaps remain around failure modes, such as what happens with uncommitted changes or a missing task, and there is no statement of irreversibility.

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, zero waste, with the destructive action and its main caveat front-loaded. Nothing is repeated or padded.

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?

For a two-parameter destructive cleanup tool with no output schema, the description covers what is removed, what is preserved, and how to preserve work. Only edge-case behavior on dirty worktrees or partial failures is left unstated.

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 both parameters are already documented, establishing a baseline of 3. The description reinforces the delete_branch default and its consequence but adds little syntax or format detail beyond what the schema already states.

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 set: it removes both a task's worktree and its record, which is more precise than the bare name agy_cleanup. It does not, however, distinguish this from siblings like agy_task or agy_follow_up, so an agent must infer the boundary from names alone.

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?

The clause "merge or cherry-pick it first if you want to keep the work" gives a real precondition that shapes when to call this. There is still no statement of when not to use it, no mention of what to do for partial cleanup, and no pointer to any alternative tool.

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

Deploy Server

Other Tools