Skip to main content
Glama

Cancel a queued or running ZCode task

zcode_cancel

Stop a queued or running delegated coding task. Running cancellations return only after the worker process tree termination is confirmed.

Instructions

Cancel a queued or running task. Running cancellation returns only after the worker process tree termination is confirmed. Results describe Bridge/ZCode execution only: status 'completed' means the invocation and report normalization finished, NOT that the master agent accepted the work. The master agent must independently review the workspace diff and checks before deciding PASS.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
statusYes
attemptYes
task_idYes
exit_codeYes
created_atYes
error_codeNo
started_atYes
updated_atYes
worker_pidYes
finished_atYes
zcode_session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior4/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 does unusually well: it discloses that running cancellation blocks until worker process tree termination is confirmed (a non-obvious synchronous behavior) and clarifies that a 'completed' status reflects only invocation/report normalization, not master-agent acceptance. Idempotency, behavior on already-terminal tasks, and permission requirements remain undisclosed.

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?

The action and scope are front-loaded in the first sentence, and the subsequent sentences about blocking behavior and result semantics each carry real information. The master-agent 'PASS' caveat is slightly tangential to invoking this specific tool but is not wasted given the result ambiguity it resolves.

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?

An output schema exists, so return values need not be explained, yet the description goes further and disambiguates the 'completed' status, which is the main interpretive hazard for this tool. Combined with the blocking-termination disclosure, it is nearly complete; prerequisites and failure modes are the only notable omissions.

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 description coverage is 0% and the single parameter task_id is never mentioned in the description, so no meaning is added beyond the property name. The name is largely self-explanatory, which keeps this at baseline rather than below it, but the description does not say where the id comes from or its expected format.

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?

The first sentence states a specific verb (cancel) and resource (task) plus the scope ('queued or running'), and no sibling tool offers cancellation, so an agent can route to it unambiguously. This is a clean verb+resource+state statement.

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?

Usage is implied by the scope qualifier ('queued or running'), which tells the agent the tool is valid for tasks in either state, but there is no explicit when-to-use guidance, no statement about what happens if the task is already finished, and no reference to alternatives such as zcode_status or zcode_continue for inspecting tasks.

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