Skip to main content
Glama

cancel_job

DestructiveIdempotent
        Stops a long job that a tool started. The job is marked CANCELLED at once and its scrape runs
        are asked to stop; a run that is in the middle of a page finishes that page first. The answer
        says `stopping: true` while a run is still stopping.

        Rows collected before the cancel stay stored and stay charged - read them with the results
        tool. Addresses that were never fetched are not charged. A cancelled job cannot be resumed;
        send the original request again to start a new one.

        Each account can run a limited number of jobs at the same time. The place of a cancelled job
        becomes free only once its runs have really stopped, so a new job sent right after a cancel
        may be refused as busy for a short time - wait and send it again.

        Calling this tool twice is safe: the second call reports the same state.

        Args:
          - jobId (path, required): the job_id a tool returned.

        Returns:
          McpOutcomeCancelDTO: `jobId`, `status` (CANCELLED - or DONE / FAILED when the job had
          already finished and there was nothing to cancel), `stopping` (true while a run is still
          stopping) and `costMicros` (what the job has cost so far, in micro-cents where
          1 000 000 = 1 EUR).

        Examples:
          - Use when: the user changes their mind about a running job -> call with its jobId.
          - Use when: a job costs more than the user agreed -> cancel it, then read what it collected.
          - Don't use when: you only want to see how far the job is -> use the results tool.
          - Don't use when: you want to stop an automation that was not started by a job -> use
            scrapewise_stop_scraper.

        Error Handling:
          - 404 NotFound: no job with this job_id in this account (also for a malformed id).
          - 403: the API key is read-only. A read-only key cannot start jobs, so it has none to cancel.
          - 401 Unauthorized.

[runtime hint] This tool returns JSON-as-text — its response shape is dynamic (per-scraper itemsConfig, file binary, etc.) so the MCP outputSchema is omitted. Do not rely on the presence of any specific field in the response; treat the result as a string-or-object blob and parse defensively.

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": {
      "jobId": "<jobId>"
    },
    "name": "cancel_job"
  }
}

Input Schema

NameRequiredDescriptionDefault
jobIdYesthe job_id a tool returned.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / jobId / description
      Added value: +"the job_id a tool returned."
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes far beyond the annotations: it discloses that in-flight page runs finish first, that already-collected rows stay stored and charged while unfetched addresses are free, that a cancelled job cannot be resumed, that the concurrency slot is not freed until runs actually stop (so a follow-up create may be refused), and that duplicate calls are safe. The destructive and idempotent hints are reified into concrete consequences rather than restated.

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?

Well-structured into purpose, side effects, concurrency caveat, idempotency, args, returns, examples and errors, with the most important consequence (partial charging) up front. It is longer than a one-parameter tool strictly needs, but nearly every line carries actionable information, so the length is largely justified.

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?

No output schema exists, yet the description documents the returned fields (jobId, status including the DONE/FAILED no-op case, stopping, costMicros with unit) and lists 404/403/401 error meanings. That is a complete calling contract for a mutation tool with a single required parameter.

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?

With one parameter at 100% schema coverage, the schema already carries the meaning. The description's only addition is that jobId is 'the job_id a tool returned', essentially echoing the schema text, 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 opening line names a specific verb and resource ('Stops a long job that a tool started') and scopes it to job-originated work rather than automations. It is immediately distinguishable from scrapewise_get_matcher_job or get_results, which the description later names explicitly.

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?

Provides explicit 'Use when' cases (user changes their mind, cost overrun) and 'Don't use when' cases with named alternatives (results tool for progress, scrapewise_stop_scraper for automations not started by a job). Nothing is left to inference about when this tool is the right choice.

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.