Skip to main content
Glama

Cancel a job

job_cancel
Idempotent

Cancel a queued job before it reaches the model to avoid consuming a try; running jobs retain their work and charge, while paid purchases need reconcile_purchase.

Instructions

Give up on a job. Cancelling a live test that is still QUEUED is genuinely free — nothing reached the model and no free try was consumed. Once it is running the work and the charge stand, and this tool says so instead of pretending otherwise. A buy that has already paid cannot be cancelled: use reconcile_purchase.

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": {
      "job_id": "<job_id>"
    },
    "name": "job_cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
job_idYes
reasonNo

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 only say this is a non-destructive, idempotent, open-world write; the description adds the substantive economics — no model call and no free try consumed while queued, charges retained once running — which is exactly the context an agent needs before calling a cancel tool. It still does not say what the call returns or how a failed/invalid cancel surfaces.

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?

Three front-loaded sentences: the action, the free case, the costly case plus the routing alternative. The phrasing 'instead of pretending otherwise' is voice rather than information, but it is short and does not obscure the payload.

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 two-parameter mutation with no output schema and non-destructive/idempotent annotations, the description covers the cost consequences and the sibling route, which is the risky part of calling it. Residual gaps are the return shape and the treatment of invalid job states.

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 description coverage is 0% for two parameters, so the description should explain job_id and reason; it explains neither, beyond implying the target is a job. It compensates partly by explaining the state conditions under which a job_id is even cancellable.

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?

The verb+resource is identifiable ('Give up on a job', 'Cancelling a live test'), and the definition explicitly scopes which jobs qualify and which do not. It distinguishes itself from reconcile_purchase for the paid-buy case, though 'give up on' is softer than a plain 'cancel' up front.

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 states the free case (QUEUED), the costly case (running — work and charge stand), and the disallowed case (already-paid buy), and names the alternative tool to use there: reconcile_purchase. That is explicit when/when-not/alternative guidance.

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