Skip to main content
Glama
ZenRows
by ZenRows

batch_rerun

Restart an ended Batch job to recover failed or unstarted tasks while carrying over completed results, or rerun selected task statuses or every task with full mode.

Instructions

Start a new run of a Batch job whose latest run ended (completed, stopped or failed). By default it reruns only the tasks that failed or never started (status ["failed", "pending"]), and carries the others' results over: the recovery after a run that failed on credits or was cancelled. Pass status to pick other task statuses, or full:true to scrape every task again. Rerun tasks are billed like new ones.

A rerun of only some tasks works up to 10 days after the run started (BATCH_RERUN_WINDOW_EXPIRED after that; full:true still works). BATCH_NO_MATCHING_TASKS: no task has those statuses. BATCH_RUN_NOT_FINISHED: the latest run is still in flight. Sends an Idempotency-Key, so a retry never starts two runs. Returns the new run at once (it writes its tasks first, ingesting:true); call batch_wait.

Input Schema

NameRequiredDescriptionDefault
fullNoRerun every task, not only some (default false)
job_idYesBatch job id returned by batch_create or batch_list
statusNoTask statuses to rerun (default ["failed", "pending"]). Ignored with full:true.
idempotency_keyNoSent as the Idempotency-Key header, up to 128 characters; generated per call when unset. Reusing a key with the identical request within 24 hours returns the original response instead of doing it again; with a different request it is BATCH_IDEMPOTENCY_CONFLICT.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.15.1

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only mark this as a non-read-only, non-destructive, open-world write. The description goes well beyond that: billing ('Rerun tasks are billed like new ones'), the 10-day partial-rerun window, specific error codes, automatic Idempotency-Key handling, and the fact that it returns immediately while tasks ingest. This is unusually rich behavioral disclosure.

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-loaded with the core action, then defaults, alternatives, constraints and errors in a logical order; nearly every sentence earns its place. It is dense and long, but the density is information rather than padding.

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?

Given a mutation tool with no output schema and four parameters, the description supplies the missing pieces: failure modes, time window, idempotency guarantee, billing implication, immediate-return semantics, and the next call to make. Nothing an agent needs to invoke it correctly is absent.

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: what the default status set is and why, that status is ignored under full:true, and that full:true 'scrapes every task again.' The idempotency_key semantics largely restate the schema.

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 description states a precise verb+resource with a precondition: 'Start a new run of a Batch job whose latest run ended (completed, stopped or failed).' This distinguishes it cleanly from sibling tools like batch_create (new job) and batch_resume (in-flight run), so an agent can route without opening the schema.

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 names the default behavior (rerun failed/pending), the recovery scenario ('after a run that failed on credits or was cancelled'), and the alternative modes (status, full:true), plus the follow-up call to batch_wait. It stops short of explicitly contrasting with sibling tools such as batch_resume, so it is clear context rather than full when/when-not guidance.

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