Skip to main content
Glama

Update an ebook

update_ebook
Destructive

Edit an existing Unplain ebook: its design, its cover, its table of contents, its CTA page, the dashboard name, and the body. RESTYLING happens here, not through separate setters: 'brandThemeId', then 'preset', then 'theme' (individual colours, fonts, type sizes and spacing), then 'cover.style', applied in that order in one atomic write, so "make it feel like an independent literary journal" is a single call. get_design_options lists the valid values; get_ebook reports the current ones under theme.design, in the same field names this tool accepts. 'cta' is the CTA page Unplain adds at the end: its layout, headline, body, button label, link and showButton switch (false, or an empty label, hides the button), social links and the footer credit switch, the same fields as the editor's CTA settings. A shown button needs a real url: with none, one Unplain cannot link to, or the placeholder https://example.com it is left out of the PDF, and warnings say so. Send only the keys to change; the rest stay as they are. Edit the body EITHER with 'operations' (precise block edits by block id, from get_ebook, applied atomically) OR with 'content' (replace the whole body with new Markdown), never both. Pass the 'version' from get_ebook so the update is rejected rather than silently overwriting a change made in the web app in the meantime. Nothing is written unless every part of the call is valid.

Input Schema

NameRequiredDescriptionDefault
ctaNoThe CTA page Unplain adds at the end of the ebook: its layout, headline, body, button (and whether it is shown), the address the button opens, the social links and the footer credit switch. Unplain writes this page, so it takes no part of the document and never counts toward the free plan's page limit. Send only what should change; every key left out stays as it is.
tocNoTable of contents. A guide of more than a few sections reads better with one.
nameNodashboard name
coverNo
themeNoIndividual theme properties for THIS ebook only, applied on top of any preset or Brand Theme in the same call. Every field is optional; send only what you want to change.
titleNo
authorNo
presetNoApply a built-in Unplain preset as the starting look (colors, fonts, type scale, corner radius, cover layout, footer). Content is never touched. Combine with 'theme' to adjust individual properties on top. See get_design_options for what each preset looks like.
contentNoreplace the entire body with this Markdown. Cannot be combined with operations.
versionNothe version returned by get_ebook. Strongly recommended: the update is then rejected rather than applied if the ebook changed in the meantime.
subtitleNo
projectIdYes
operationsNoblock-level edits, applied in order and atomically. A block rewritten with set_text or set_items keeps its treatment (see get_ebook) only if the new text still qualifies, for example a stat must stay a short figure like "47%" or "$2.4M ARR"; otherwise it returns to standard styling and warnings name it. A statCaption also loses its treatment when the block above it stops being its stat (rewritten, deleted, moved, or a block inserted between). No operation adds a treatment.
brandThemeIdNoApply one of the caller's saved Brand Themes, from list_brand_themes: its colors, fonts, logo and social links. Use this when the user says "my brand" or names their company. Applied BEFORE preset and theme, so those can adjust it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / cta / properties / showButton / description
      Previous value: -"Whether the CTA page draws its button (true when never set). false hides it and keeps buttonText and url, so true brings the same button back. The button draws only when this is true and buttonText is not empty; give it a url too, or it links nowhere."New value: +"Whether the CTA page draws its button (true when never set). false hides it and keeps buttonText and url, so true brings the same button back. The button draws only when this is true and buttonText is not empty, and it is in the PDF only with a real url."
    • changedInput schema / properties / cta / properties / url / description
      Previous value: -"Where the button goes: a web address (a bare domain is read as https) or an email address (opened as mailto:). Any other scheme is refused. An empty string leaves the button with no link; to have no button, set showButton to false instead."New value: +"Where the button goes: a web address (a bare domain is read as https) or an email address (opened as mailto:). Any other scheme is refused. A new ebook has none. A shown button with no url, or the placeholder \"https://example.com\", is left out of the PDF and the call warns; to have no button, set showButton to false instead."
  2. Changed4 schema fields changed
    • changedInput schema / properties / cta / description
      Previous value: -"The CTA page Unplain adds at the end of the ebook: its layout, headline, body, button, the address the button opens, the social links and the footer credit switch. Unplain writes this page, so it takes no part of the document and never counts toward the free plan's page limit. Send only what should change; every key left out stays as it is."New value: +"The CTA page Unplain adds at the end of the ebook: its layout, headline, body, button (and whether it is shown), the address the button opens, the social links and the footer credit switch. Unplain writes this page, so it takes no part of the document and never counts toward the free plan's page limit. Send only what should change; every key left out stays as it is."
    • changedInput schema / properties / cta / properties / buttonText / description
      Previous value: -"The button's label, for example \"Book a call\". An empty string hides the button."New value: +"The button's label, for example \"Book a call\". An empty string hides the button (no default label is drawn in its place)."
    • addedInput schema / properties / cta / properties / showButton
      Added value: +{
      +  "description": "Whether the CTA page draws its button (true when never set). false hides it and keeps buttonText and url, so true brings the same button back. The button draws only when this is true and buttonText is not empty; give it a url too, or it links nowhere.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / cta / properties / url / description
      Previous value: -"Where the button goes: a web address (a bare domain is read as https) or an email address (opened as mailto:). Any other scheme is refused. An empty string leaves the button with no link."New value: +"Where the button goes: a web address (a bare domain is read as https) or an email address (opened as mailto:). Any other scheme is refused. An empty string leaves the button with no link; to have no button, set showButton to false instead."
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: the resolution order brandThemeId → preset → theme → cover.style applied in one atomic write, partial-update semantics ('send only the keys to change; the rest stay as they are'), all-or-nothing validation ('Nothing is written unless every part of the call is valid'), and warning-driven outcomes such as a button with no real url being left out of the PDF. This meaningfully qualifies the destructiveHint=true and idempotentHint=false flags.

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 editable facets before the mechanics, and nearly every sentence carries non-redundant information. It is a single dense block paragraph, though; the restyling-order and body-editing rules would land faster split into separate sentences or lines.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 14-parameter destructive mutation with nested objects and no output schema, it covers mutation semantics, atomicity, concurrency and validation thoroughly. It does not say what the call returns (new version, warnings list) beyond hints that 'warnings' exist, and it omits plan/limit effects outside the CTA note.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 64% across 14 parameters, and the description compensates precisely where the schema cannot: the ordering/precedence among brandThemeId, preset, theme and cover.style, the field-name alignment with get_ebook's theme.design, the operations-vs-content exclusivity, and the version/locking contract. These are semantics no schema field could express.

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?

Opens with a specific verb+resource ('Edit an existing Unplain ebook') and enumerates the exact facets it owns: design, cover, table of contents, CTA page, dashboard name, body. It explicitly claims the restyling surface ('RESTYLING happens here, not through separate setters'), which separates it from create_ebook, get_ebook and update_brand_theme.

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 explicit when-to-use routing: get_design_options for valid values, get_ebook for current values, list_brand_themes for brandThemeId. It states a hard either/or for body editing ('operations' OR 'content', never both) and tells the agent to pass 'version' from get_ebook to avoid silent overwrites.

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