Skip to main content
Glama

cancel_worker

Cancel a spawned worker using an authorized spawn or child token. Idempotent, so repeated calls have no additional effect.

Instructions

Cancel a spawned worker. Idempotent. Authorised for the root spawn_token, or a child_token belonging to one of the target's ancestors.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonNo
worker_idYes
child_tokenNo
spawn_tokenNo
binding_tokenNoOpaque token returned by this agent's join_session or plan_session. Required for reliable identity when logical agents share an MCP connection.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior3/5

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

With no annotations, the description carries the burden, and it does add meaningful behavioral context: the operation is idempotent and restricted to specific token relationships. However, it does not disclose whether cancellation is terminal, what side effects occur, or what errors or results to expect, leaving coverage partial.

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?

Three short sentences, each earning its place: one identifies the operation, one states idempotency, and one specifies the authorization scope. There is no filler or redundancy.

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?

A 5-parameter tool with no output schema and no annotations requires more context than this. The token-authorization note helps, but the description omits required parameter semantics, return behavior, cancellation effects, and error conditions, making reliable invocation uncertain.

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 only 20%, so the description must compensate. It clarifies spawn_token as the root authorization and child_token as an ancestor-linked token, but the required worker_id and the reason parameter remain undocumented in both schema and prose.

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 ('Cancel') and resource ('a spawned worker'), so an agent can clearly tell what the tool does. It does not explicitly distinguish it from sibling lifecycle tools such as complete_worker, but the core action is unambiguous.

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?

The description gives no guidance on when to use cancel_worker versus alternatives like complete_worker, release_task, or other worker-management tools. The idempotency note and authorization condition are useful invocation constraints, but they do not address usage selection.

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