Skip to main content
Glama

Cancel job

cancel_job

Cancel a job the caller can access by its id (recovers a mistaken or duplicate submission). An API token can cancel any job in its organization, so an id from list_jobs may belong to a human teammate — cancel only a job the user explicitly identified. Only jobs still in PENDING state can be cancelled; a job already PROCESSING or COMPLETED returns an error — poll get_job first if unsure. Refunds the credit only if the job had not started processing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jobIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only declare the mutation/idempotency profile; the description goes further by disclosing state preconditions (only PENDING is cancellable), the error behavior for PROCESSING/COMPLETED, and the credit-refund rule tied to whether processing began. These are behavioral traits the annotations cannot convey.

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?

Front-loaded with purpose, then safety caveat, then state constraint, then refund rule — four clauses, each load-bearing, no filler. Sized appropriately for a mutation tool with real failure modes.

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

Completeness5/5

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

With no output schema and sparse annotation coverage, the description compensates fully: preconditions, error outcomes, and the monetary side effect are all present. An agent has everything needed to call this correctly or avoid calling it wrongly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the single jobId param is untyped in prose, but the description adds real semantic context: the id must be one the user explicitly identified, and an org-wide token means ids from list_jobs may not be the caller's. That is meaningfully more than the schema's 'string, minLength 1'.

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?

States a specific verb and resource ('Cancel a job ... by its id') with the caller-scope qualification, and implicitly routes against siblings by contrasting with get_job/list_jobs. An agent can identify exactly what this does without opening the schema.

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

Usage Guidelines5/5

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

Explicit when-to-use ('recovers a mistaken or duplicate submission'), plus a when-not/alternative path ('poll get_job first if unsure') and a safety exclusion (don't cancel a teammate's job merely found via list_jobs). This is close to ideal routing guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources