Skip to main content
Glama

Start drawing a book

create_book
Idempotent

Starts drawing a book from a ready plan (plan_book) and returns job_id and project_id at once; poll job_id with get_job (it waits up to 25 s a call) until done. Costs, in pages of the account’s balance: coloring 1 per page, storybook 1 per page, comic 2 per page, puzzle 1 per puzzle (solution pages free). spend_limit must cover what this call starts, or nothing starts (limit_exceeded): the whole book (plan_book’s estimated_cost), or with a preview only the 2 preview pages (2 pages of balance for a storybook, 4 for a comic); approve_preview then needs its own spend_limit for the rest. Pages are charged as they are drawn. Storybooks and comics of 8+ pages draw the preview first (preview defaults to true) and wait for approve_preview. A plan with flags is refused until revise_plan fixes them. One plan makes one book: calling again with the same plan returns the same job (already_started, nothing spent). The account has an hourly limit on books started (every kind, through any connection or on colorcraft.ai; get_account shows it): past it, create_book is refused with rate_limited and retry_after_seconds (until the next hour). This connection’s caps (get_account’s credential.caps) refuse it too: with too_many_in_flight, active_job_ids and next_actions (get_job, approve_preview, cancel_book) while its books in progress at once are at the limit, or spend_cap_reached. plan_book and get_plan say so in can_create. Reuse idempotency_key to retry safely. Next: get_job; when done, generate_front_cover, export_cover_wrap, generate_listing and export_interior_pdf.

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": {
      "plan_id": "<plan_id>",
      "spend_limit": "<spend_limit>",
      "idempotency_key": "<idempotency_key>"
    },
    "name": "create_book"
  }
}

Input Schema

NameRequiredDescriptionDefault
plan_idYesA ready plan_id from plan_book.
previewNoStorybook/comic only: draw 2 preview pages first and wait for approve_preview (default true for 8+ pages).
spend_limitYesThe most pages of balance this call may use. The call is refused (limit_exceeded) when the estimate is higher.
idempotency_keyYesA 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 or get_project. 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

NameRequiredDescriptionDefault
kindYes
job_idYesBook job handle: poll with get_job.
plan_idYes
previewYesTrue when the book starts (or started) with a preview that waits for approve_preview.
warningsYes
book_costYesPages of balance the whole book uses.
project_idYes
pages_totalYesPages to draw (puzzles for a puzzle book). Not the printed count: plan_book’s interior_pages.
next_actionsYes
estimated_costYesPages of balance this call will use (the preview pages when preview is on; 0 when already_started).
already_startedYesTrue when this plan had already started this book (nothing new was spent).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false, idempotentHint=true, destructiveHint=false, openWorldHint=false; the description goes far beyond by disclosing per-page costs by book type, the spend_limit gate and limit_exceeded failure, page-charging timing, hourly start-rate limits with retry_after_seconds, per-connection caps (too_many_in_flight, spend_cap_reached), and the already_started no-op on repeat plans. This is exactly the operational context an agent needs before spending account balance.

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 purpose and the follow-up call, and essentially every sentence carries non-obvious information about cost, limits, or idempotency. The one drawback is that it is a single dense paragraph mixing costs, rate limits, caps, and next steps, which makes it slower to scan than a separated cost/limits/next-steps layout would be.

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 mutating, spend-incurring tool with four parameters and an output schema, the description covers preconditions, cost model, refusal modes, retry safety, and the follow-up tool sequence. Nothing an agent needs to invoke it safely is missing, and return-value detail is rightly left to the output schema.

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 beyond the field docs: it specifies that spend_limit must cover the whole book's estimated_cost or only the 2 preview pages (2 pages of balance for a storybook, 4 for a comic), and that approve_preview needs a separate subsequent spend_limit. Preview default behavior (true for 8+ pages) and idempotency_key reuse semantics are also reinforced rather than merely restated.

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 (starts drawing a book) plus the precondition (from a ready plan via plan_book) and immediate result (job_id and project_id at once). An agent can distinguish it from plan_book, approve_preview, and retry_book without opening any schema.

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 routes the agent forward ('poll job_id with get_job'; 'Next: get_job; when done, generate_front_cover, export_cover_wrap, ...') and back ('a plan with flags is refused until revise_plan fixes them'). It also states the preview fork (draw preview first, wait for approve_preview) and the idempotency retry rule, so when-to-use and when-not-to-use are both covered.

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