Skip to main content
Glama

cancel_job

Cancel a queued or running browser job by its job ID, ending it as failed with a CANCELLED error code and preserving its browser charge.

Instructions

Cancel a queued or running job. The job ends as failed with error_code CANCELLED and keeps its browser charge. A job that already finished returns an error with code JOB_NOT_CANCELLABLE.

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": "cancel_job"
  }
}

Input Schema

NameRequiredDescriptionDefault
job_idYesJob UUID.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.2

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does well by disclosing the outcome: the job ends as failed with error_code CANCELLED and retains its browser charge. It also documents the non-cancellable case, though it does not discuss permissions, immediacy, or broader irreversibility.

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 three tight sentences, front-loaded with the action and followed by outcome and edge-case behavior. Every sentence adds useful information without repetition or filler.

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 simple one-parameter mutation with no annotations or output schema, the description covers purpose, side effect, and a key error case. It stops short of describing the successful return value or authorization requirements, but it is largely sufficient for correct invocation.

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?

There is only one parameter, job_id, and the schema already documents it as a Job UUID at 100% coverage. The description does not add syntax, format, or selection guidance beyond what the schema provides, so the baseline 3 is appropriate.

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 description clearly states a specific verb and resource: cancel a queued or running job. It is immediately understandable, but it does not explicitly differentiate this tool from siblings such as get_job or respond_to_job.

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?

It specifies the valid states for cancellation, queued or running, and explicitly notes that an already finished job returns JOB_NOT_CANCELLABLE. It does not name alternative tools or broader workflow alternatives, so it falls short of fully explicit routing guidance.

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