Skip to main content
Glama

agy_cleanup

Clean up a finished worker by forgetting it and removing its git worktree, with optional branch deletion and forced removal.

Instructions

Forget a finished worker and remove its worktree.

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

Input Schema

NameRequiredDescriptionDefault
forceNo
agent_idYesAgent id.
delete_branchNo
remove_worktreeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full burden, and it only discloses two effects: the agent is forgotten and the worktree removed. It does not say whether the operation is destructive or irreversible, whether a branch is also discarded, when 'force' is required, or whether running workers are rejected.

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?

A single tight sentence with no filler and the destructive effect front-loaded. It is efficient, though arguably too terse for a four-parameter destructive tool.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive lifecycle tool with three undocumented boolean parameters, no annotations, and no output schema, the definition leaves too much unspecified. An agent cannot confidently predict the side effects of calling it with default arguments.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 25% — agent_id is documented trivially as 'Agent id.' and force, delete_branch, and remove_worktree are undocumented in both schema and description. The description hints that worktree removal is part of the operation but never clarifies the defaults or what each flag changes.

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?

States a specific verb pair and object: forget a worker and remove its worktree, which is more informative than the name alone. It also scopes the target ('a finished worker'), but gives no explicit contrast with siblings such as agy_stop or agy_merge.

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 phrase 'finished worker' implies the tool applies only once an agent's work is complete, which is useful implied guidance. However, it never states what to do instead for a still-running worker (agy_stop) or how this differs from merge, leaving the agent to infer.

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