Skip to main content
Glama

batch_cancel

DestructiveIdempotent

Stop a Batch job's current run for good. No task still waiting is started or billed; tasks already in flight finish (and bill). Results so far stay readable with batch_results. Tasks that never started stay pending: batch_rerun (default failed and pending) runs them later. Idempotent: a run that already ended answers with its final status and already_ended:true. To halt without ending the run, use batch_pause.

Input Schema

NameRequiredDescriptionDefault
job_idYesBatch job id returned by batch_create or batch_list

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / job_id / description
      Previous value: -"Batch job id to stop"New value: +"Batch job id returned by batch_create or batch_list"
    • addedInput schema / properties / job_id / minLength
      Added value: +1
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the 'destructiveHint' annotation, the description adds crucial behavioral details regarding resource consequences. It specifies that tasks in flight 'finish (and bill)' while waiting tasks are stopped and unbilled, which is essential operational context.

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?

The description is dense and long, but every sentence serves a critical purpose, detailing state transition, billing consequences, and sibling comparisons. It is highly informative without being unnecessarily rambling.

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?

Given the complexity of job state management, the description is exceptionally complete. It clarifies not only what cancellation does but also the resulting state (results stay readable, pending tasks remain, idempotency details) for an AI agent to execute correctly.

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?

Since the schema coverage is 100%, the schema already provides full semantics for the required 'job_id' parameter. The description does not add unique semantic value beyond confirming its necessity.

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 resource ('Batch job'), clearly defining the action. It distinguishes itself by stating the action is 'for good,' setting it apart from alternative state management actions like pausing or rerunning.

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?

It provides explicit guidance on when to use this tool versus its close sibling, stating: 'To halt without ending the run, use batch_pause.' It also details the differential effect on waiting vs. in-flight tasks.

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.