Skip to main content
Glama

Cancel a job

claude_cancel
Idempotent

Stop a running job and terminate its entire process tree to prevent lingering background processes. Use this to cancel active Claude Code subagent tasks cleanly.

Instructions

Stop a running job and the process tree it started.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jobIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already indicate this is a mutating (readOnlyHint=false) and idempotent (idempotentHint=true) operation. The description adds meaningful behavioral detail beyond annotations by stating that the entire process tree started by the job is stopped, not just the job itself.

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?

The description is a single, front-loaded sentence with no filler. Every word adds value: 'Stop' states the action, 'running job' states the target, and 'process tree it started' states the scope.

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 simple one-parameter tool with no output schema, the description covers the essential behavior and side effect. It does not explain return values or error cases, but the idempotent annotation and simple schema make this acceptable.

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 description does not mention jobId at all. While the parameter name is self-explanatory, the description provides no guidance on where to obtain the jobId, its format, or how it relates to the cancellation action, so it fails to compensate for the missing schema documentation.

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 description uses a specific verb ('Stop') and a clear resource ('a running job'), and adds the precise scope 'the process tree it started.' This distinguishes it from siblings like claude_run (starting), claude_status (checking), and claude_reply (responding).

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

Usage Guidelines4/5

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

The phrase 'Stop a running job' provides clear context for when the tool should be used: when a job is actively running and needs to be terminated. It does not explicitly name alternatives or exclusions, but the running-job condition is a clear usage signal.

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