Skip to main content
Glama

Discard task changes

discard_task
DestructiveIdempotent

Throw away a worktree-isolated task's changes, canceling it if running. Use to reject a delegated agent's work before applying its diff.

Instructions

Throw away a worktree-isolated task's changes (cancels it if running).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYestask_id from start_task

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.2

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and readOnlyHint=false, so the safety profile is covered. The description adds genuinely new behavioral context: the scope is worktree-isolated changes, and the task is also cancelled if it is currently running, which is a non-obvious side effect.

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?

One compact sentence, front-loaded with the core action and parenthetically noting the conditional cancellation. No wasted words.

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 single-parameter, destructive tool with no output schema and full annotation coverage, the description conveys what it does, the isolation scope, and the running-task side effect. It could say more about what happens to the worktree or whether the task becomes unretrievable, but it is largely complete.

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% and the single task_id parameter is documented as coming from start_task. The description adds nothing about parameter format or sourcing, so baseline 3 is appropriate.

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?

Specific verb (throw away) plus resource (a worktree-isolated task's changes), and it clarifies the interaction with cancellation. It distinguishes itself reasonably from cancel_task and get_task_diff, though it never names a sibling explicitly.

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

Usage Guidelines2/5

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

There is no explicit when-to-use guidance or comparison to alternatives like cancel_task, apply_task, or get_task_diff. Usage is only inferable from the phrase 'throw away ... changes'; the agent is left to guess when discarding is preferable to cancelling or applying.

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