Skip to main content
Glama
spidra-io

spidra-mcp-server

Official
by spidra-io

spidra_cancel_job

DestructiveIdempotent

Cancel a running batch, crawl, or search job by type and ID, stopping unstarted work, halting active jobs at their next checkpoint, and returning held credits where applicable.

Instructions

Cancel a running batch, crawl or search.

  • "batch": URLs not yet started are stopped and their held credits returned; finished ones keep their results. A cancelled batch can't be retried.

  • "crawl": stops at its next check. If it had returned pages, it ends completed with those (charged as usual); if not, cancelled and free. spidra_crawl_pages still reads its pages.

  • "search": one not yet started is removed; a running one stops at its next checkpoint and then reports failed with "Search cancelled".

Input Schema

NameRequiredDescriptionDefault
idYesThe job's id (batchId or jobId)
typeYesWhat kind of job

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.7.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the destructiveHint/idempotentHint annotations: it discloses partial credit refunds for batches, that finished URLs keep results, that crawls may end 'completed' with already-charged pages, and that searches end 'failed: Search cancelled'. These are precisely the side effects an agent needs before invoking a destructive operation, and nothing contradicts the annotations.

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?

One-line summary followed by a tightly scoped bullet per enum value; the most consequential facts (credits returned, no retry, charged-for-completed-crawl) are front-loaded. No filler sentences.

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, and the description compensates by describing the terminal state per job type, including the error string returned by a cancelled search. An agent has everything needed to decide and to interpret the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning for the 'type' enum by defining what cancelling means for each of batch, crawl and search — including which sibling tool (spidra_crawl_pages) still works afterwards. It adds nothing about the 'id' parameter shape (batchId vs jobId), which the schema already covers.

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 (cancel) and resource (a running batch, crawl or search) up front, and the per-type breakdown makes the exact scope of the operation unambiguous. No sibling tool cancels work (the neighbours are get_job, retry_batch, retry_crawl_page, crawl_pages), so the boundary is clear from the wording alone.

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 gives clear per-type conditions and one important exclusion — 'A cancelled batch can't be retried' — which steers the agent away from cancelling when recovery is wanted. It never names sibling alternatives (e.g. spidra_retry_batch or spidra_get_job) for checking status first, so it falls short of 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.