Skip to main content
Glama
zcode-worker-mcp
by Hope-08

Safely Cancel a Managed ZCode Worker Task

zcode_cancel
DestructiveIdempotent

Cancels a managed task by terminating verified worker/app-server processes—guarding against Windows PID reuse—and releasing the workspace lock.

Instructions

Terminate verified worker/app-server processes (strictly guarding against Windows PID reuse) and release the workspace lock.

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": "zcode_cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
reasonNoOptional cancellation reason recorded in task history.Cancelled by caller
task_idYesManaged task_id to cancel.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

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 still adds real value beyond them: it specifies that processes are verified before termination, that Windows PID reuse is guarded against, and that the workspace lock is released as a 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler; the primary action leads and the parenthetical qualification follows. The PID-reuse clause is dense but earns its place by explaining verification behavior.

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

Completeness3/5

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

For a two-parameter destructive tool with a complete schema and no output schema, the description covers the core mechanics well. It does not explain what happens to the cancelled task's state or history, nor what a caller should check before cancelling, leaving a modest gap for a destructive lifecycle operation.

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 100%, with both task_id and reason documented inline, so the baseline is 3. The description adds nothing about parameter meaning or format, but the schema already carries that burden adequately.

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 states a specific verb+resource: terminate verified worker/app-server processes and release the workspace lock. It is clearly distinct from the lifecycle siblings (zcode_start, zcode_continue, zcode_reply, zcode_watch_session), though it never names a sibling or contrasts itself explicitly.

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 only implied: the tool cancels a managed task. There is no statement of when to prefer cancel over zcode_continue or zcode_reply, no prerequisite on task state, and no 'do not use if...' exclusion, so the agent must infer routing from the name alone.

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