Skip to main content
Glama

Retry a failed book job

retry_job

Retry a book job that has FAILED. Reads the original workflow input from the job's stored Step Functions execution and starts a fresh execution of the same state machine in rerun mode, so page images that were already generated are reused instead of being paid for again. Only works on jobs in FAILED status; check with get_job_status first. Returns the job with its new status and execution.

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

Input Schema

NameRequiredDescriptionDefault
jobIdYesThe jobId of the failed job, as returned by a book creation tool or get_job_status.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations only say readOnlyHint=false and destructiveHint=false; the description carries substantial extra weight by revealing that it reads stored execution input, launches a fresh execution in 'rerun mode', and reuses already-generated page images to avoid duplicate charges. It also states what is returned (the job with new status and execution). It stops short of describing failure modes of the retry itself or whether the original execution is left untouched, so a 4 rather than a 5.

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?

Three tight sentences: what it does, how it avoids cost, and the precondition. The status constraint and the cost-saving rationale are front-loaded with zero filler.

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 covers the mechanism, the precondition, the cost behavior, and the return shape. An agent has everything needed to decide to call it and 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 jobId format is already documented; the description adds the meaningful constraint that the id must reference a FAILED job and reiterates the accepted sources (creation tool or get_job_status). Marginal but real value on top of a fully documented single parameter.

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?

Uses a specific verb ('Retry') plus precise resource ('a book job that has FAILED') and describes the underlying mechanism (re-running the same state machine from the stored Step Functions input). This clearly separates it from the create_* siblings, which produce new jobs rather than re-executing an existing one.

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?

Explicitly states the precondition ('Only works on jobs in FAILED status') and names the alternative step to take first ('check with get_job_status first'), routing the agent to a specific sibling. The when-to-use condition is unambiguous and no inference is required.

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