Skip to main content
Glama

cancel_job

DestructiveIdempotent

Stops the process tree of a running background job and returns its final status, so you can terminate work you no longer need and confirm how it ended.

Instructions

Stop the process tree for a running background job and return its final status.

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": {
      "jobId": "<jobId>"
    },
    "name": "cancel_job"
  }
}

Input Schema

NameRequiredDescriptionDefault
jobIdYesJob ID returned by a background tool.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, so the safety profile is covered. The description adds two pieces of real value beyond those annotations: the cancellation targets the whole process tree (children are killed too), and the call returns the job's final status, implying it waits for termination rather than firing asynchronously.

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?

A single sentence that front-loads the action, names the scope (process tree), and closes with the return value. Nothing is redundant and nothing is buried.

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 one-parameter tool with no output schema, the description covers action, scope, and result. What is still missing is termination semantics (graceful signal vs hard kill) and error behavior for an already-completed job — meaningful gaps for a destructive operation, but not disqualifying.

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 coverage is 100% and jobId is already documented as 'Job ID returned by a background tool'. The description adds no further semantics about the identifier or its sourcing beyond what the schema states, so baseline 3 applies.

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?

Specific verb and resource: "Stop the process tree for a running background job" and it states the return ('final status'). This distinguishes it from job_status, which only observes; however, no sibling is named explicitly, so the differentiation is implied rather than stated.

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?

The condition for use (a job that is still running) is implied by 'running background job', but there is no explicit when-not guidance, no mention of checking job_status first, and no statement about what happens if the job has already finished.

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