Retry missing pages
retry_bookDraws only the missing or failed pages of a finished book that get_job shows as partial or failed, keeping every page already drawn (it never redraws or deletes pages). Uses 1 page of balance per missing page (2 for a comic page, 1 per missing puzzle); spend_limit must cover estimated_cost. A book in any other state (drawing, paused at its preview, complete, cancelled) is refused with not_ready, its status, retryable (true only while it is still drawing: poll get_job, then retry if it ends partial or failed) and next_actions; a cancelled book can’t be retried, nor a puzzle book whose run was stopped (refused with not_ready too: get_job offers it plan_book). Next: get_job.
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": {
"job_id": "<job_id>",
"spend_limit": "<spend_limit>",
"idempotency_key": "<idempotency_key>"
},
"name": "retry_book"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | The book’s job_id from create_book or list_active_jobs (job_book_…). | |
| spend_limit | Yes | The most pages of balance this call may use. The call is refused (limit_exceeded) when the estimate is higher. | |
| idempotency_key | Yes | A unique label for this request (e.g. a UUID, 8-120 characters). Reuse it, with the same arguments, to retry safely: a repeat never does the work twice and returns the first call’s result as it was then (its text says Replayed, and the result’s _meta has colorcraft/replayed: true and colorcraft/first_called_at, the first call’s time), not the current state; read that with get_job. The same key with different arguments is refused with idempotency_conflict (a different request needs a new idempotency_key), and so is a repeat after a first call that failed part-way (its message says what to check before a new key); while the first call is still running, a repeat answers busy with retry_after_seconds. A key is remembered per tool and per account: the same key sent to a different tool is a separate request, never a replay of or a conflict with the other tool’s. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | ||
| retrying | Yes | ||
| next_actions | Yes | ||
| pages_to_draw | Yes | ||
| estimated_cost | Yes |