Skip to main content
Glama

Regenerate one page image

regenerate_image
Destructive

Regenerate the illustration on a single page of an existing book, replacing the current image for that page. Use when one page came out wrong and the rest of the book is fine. Every book includes 10 free redraws (a paperback cover 3); after those, each redraw costs one page's worth of credits — still far less than rerunning the whole book. get_job_status reports freeEditsRemaining for the book, and this tool's response says whether the redraw was free and how many free redraws are left. The description says what should change; it is combined with that page's original prompt, so describe the fix ('make the dog smaller and move it to the left'), not the whole scene from scratch. On an activity book, a built page's puzzle — the maze, the word search grid and words, the sudoku's numbers, the letters to trace — always stays exactly as it is; the change is made to the picture and the page around it. This does NOT rebuild the PDF. The job is PROCESSING until every page being redrawn has finished, and generate_pdf is refused until then, so regenerate every page you want to fix, poll get_job_status until the job is IMAGES_READY, and then call generate_pdf once.

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>",
      "pageNumber": "<pageNumber>",
      "description": "<description>"
    },
    "name": "regenerate_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
jobIdYesThe jobId of the book containing the page, as returned by a book creation tool or get_job_status.
pageNumberYesWhich interior page to regenerate, counting from 1. Must be within the book's page count.
descriptionYesWhat should change about this page, in plain language. Combined with the page's original prompt rather than replacing it. Write a saved character's name from list_my_characters as @Name to draw them from their saved picture.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and openWorldHint=true, and the description adds real context beyond them: the credit cost model with exact free-tier allowances, that the response reports whether the redraw was free and how many remain, that built activity-book puzzles are preserved while the surrounding picture changes, and that the PDF is not rebuilt and generate_pdf is refused until IMAGES_READY. That is unusually rich behavioral disclosure. It stops short of a 5 only because it does not describe failure modes (e.g., invalid page numbers, insufficient credits) or latency expectations for the redraw itself.

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 purpose, cost, and the key prompt-composition instruction, and each block is useful. The closing workflow sentence partly restates the earlier point about the job staying PROCESSING until redraws finish, so a small amount of redundancy could be trimmed.

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 3-parameter mutation tool with no output schema, the description covers everything an agent needs: when to use it, how to phrase the argument, what it costs, what it does not do (rebuild the PDF), what is preserved (activity-book puzzles), and the exact follow-up sequence. Return-value content is summarized even without an 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 baseline is 3, but the description genuinely adds meaning about the `description` parameter: it is merged with the page's original prompt rather than replacing it, and it should state the fix ('make the dog smaller and move it to the left') rather than restate the whole scene. It also reinforces where jobId comes from and that pageNumber is 1-based within the book's page count, both consistent with the schema rather than merely repeating it.

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 ('Regenerate the illustration on a single page of an existing book') and scopes it as a partial fix, which cleanly separates it from full-book generation tools. The replacement semantics ('replacing the current image for that page') make the mutation explicit without needing 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit trigger condition ('Use when one page came out wrong and the rest of the book is fine') plus the cost rationale for choosing it over rerunning the book. It also names the surrounding workflow and sibling tools (poll get_job_status for freeEditsRemaining, call generate_pdf once after IMAGES_READY) so the agent knows where this sits in the sequence.

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