Skip to main content
Glama

cancel batch

cancel_batch

Cancel an in-flight batch job to stop further processing. Work already completed before cancellation may still be billed.

Instructions

Request cancellation of an in-flight batch job. POST /v1/batches/{id}/cancel (API-key scope: platform:write). Returns: 200 with the updated batch object (status typically CANCELLING or CANCELLED) Notes: OWNER/ADMIN only (403). 404 "Batch not found". Audited. 404 while the batch feature flag is off. Work already completed before cancellation may still be billed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe platform batch id.
Install Server

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations, the description discloses the HTTP endpoint, required API-key scope, expected status values, common error codes, ownership restrictions, audit logging, feature-flag behavior, and billing consequences. This is substantial behavioral context that helps an agent anticipate side effects and failure modes.

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 compact and information-dense, with the core action and endpoint front-loaded, followed by high-value notes on permissions, errors, auditability, and billing. Every sentence adds necessary context without repetition.

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 one simple parameter, no output schema, and minimal annotations, the description covers everything needed to invoke the tool correctly: endpoint, auth scope, permission constraints, response behavior, error conditions, and side effects. Nothing critical is missing.

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?

The schema already fully documents the single parameter 'id' as 'The platform batch id' with 100% coverage. The description does not add new parameter-level detail, so the baseline of 3 is appropriate.

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 states a specific action ('Request cancellation'), a specific resource ('in-flight batch job'), and the exact endpoint. It clearly identifies the tool's scope and distinguishes it from sibling cancellation tools like cancel_fine_tuning_job or cancel_eval.

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 description gives clear context for use ('in-flight batch job') and important operational constraints such as OWNER/ADMIN only, 403 for unauthorized callers, feature-flag-related 404s, and billing implications. It stops short of explicitly naming alternatives or stating when not to use this tool, but the guidance is otherwise strong.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/omnia-v/errorbar-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server