Skip to main content
Glama

Cancel a queued or running ZCode task

zcode_cancel

Cancels a queued or running task in the ZCode bridge, waiting for worker process termination confirmation when the task is running.

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 calling host accepted the work. the calling host must independently review the workspace diff and checks before deciding PASS.

Input Schema

NameRequiredDescriptionDefault
task_idYes

Output 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.5/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 does real work: it discloses that running cancellation blocks until the worker process tree termination is confirmed, and warns that status 'completed' reflects only Bridge/ZCode execution and normalization, not host acceptance of the work. It still omits idempotency behavior, error cases (unknown/finished task_id), and any permission requirements.

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 purpose is front-loaded in the first sentence and the remaining content is substantive rather than filler. The final clause is slightly run-on and begins mid-sentence with a lowercase 'the', which hurts readability but not materially.

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 mutation tool with no annotations, the description supplies the blocking semantics and an important interpretation caveat for results, and an output schema exists so return format need not be restated. The main gap is the total silence on the required task_id parameter and on failure modes.

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 description coverage is 0% and the single parameter task_id is never mentioned in the description — no format, no source, no guidance on obtaining a valid id. With one undocumented parameter, the description does not compensate for the schema gap.

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 and resource ('Cancel a queued or running task') and constrains the scope to queued or running tasks, which distinguishes it from read-only siblings like zcode_status and zcode_result. It does not name any sibling explicitly, so it stops short of a 5.

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: cancel when a task is queued or running. There is no explicit when-not-to-use guidance, no statement about what happens if the task has already finished, and no alternative tool named, so this is minimum-viable rather than instructive.

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