Skip to main content
Glama

Cancel a queued, pending or running scan

cancel_scan
DestructiveIdempotent

Cancel a queued, pending or running scan (permission: edit)

Removes the pending queue job (best-effort) and marks the scan cancelled; answers the ScanRef with status cancelled. Idempotent: an already cancelled scan answers 200 as well. Any other terminal scan (completed/failed/broken_step/no_data) is refused 409 not_cancellable. Replaces DELETE /scans/{id} (API 1.6.0).

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": {
      "id": "<id>"
    },
    "name": "cancel_scan"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesScan id: the `id` of the ScanRef a scan trigger answered, or of an item of GET /scans.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / id / description
      Added value: +"Scan id: the `id` of the ScanRef a scan trigger answered, or of an item of GET /scans."
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the best-effort removal of the pending queue job, the return payload (ScanRef with status cancelled), idempotent 200 on repeat calls, and the exact 409 refusal for terminal scans. It also flags that it supersedes DELETE /scans/{id} in API 1.6.0, which the annotations cannot convey.

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?

Front-loads the core action and scope, then layers permissions, return behavior, and error conditions in a compact block. The closing 'Replaces DELETE /scans/{id} (API 1.6.0)' is useful migration context but is slightly incidental to invocation.

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?

For a single-parameter mutation with no output schema, the description supplies the return shape, idempotency semantics, and refusal conditions, which is everything an agent needs to call it correctly and interpret the result.

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 coverage is 100% and the schema itself explains where the id comes from (ScanRef from a trigger or an item of GET /scans), so the description need not repeat it. The description adds no further syntax or format detail beyond the schema, making the baseline of 3 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?

States a specific verb and resource ('Cancel a queued, pending or running scan') plus the qualifying preconditions, which distinguishes it from siblings like rerun_target_scan and trigger_scan that act on scans differently.

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?

Clearly delineates when the tool applies (queued, pending or running) and when it is refused (completed/failed/broken_step/no_data → 409 not_cancellable), and notes the required 'edit' permission. It stops short of naming sibling alternatives such as rerun_target_scan or trigger_scan, so a 4 rather than 5.

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.

Resources