Skip to main content
Glama
WebCake Landing MCP

WebCake Landing MCP

by vuluu2k

update_page

Destructive

Update a page's stored source with a validated edited tree, guarding against external changes and accidental overwrites; the published build is not refreshed.

Instructions

Replaces an existing page's stored source with an edited tree (source only; the published build is not refreshed). Validates first. Concurrency check: the save is refused with page_changed_externally when the page was edited elsewhere since it was last read (base_version, or the version the server recorded), or with unverified_overwrite when an unverified save would delete live element ids; force:true overrides. dry_run defaults to true: it validates, caches the source under a draft_id and returns the masked request; dry_run:false saves. A draft_id from a dry run or a failed/timed-out update re-runs from the cached source. Requires Webcake credentials.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "update_page"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNoDefault false. true saves even when the page changed outside this session, discarding those outside changes.
sourceNoThe edited page source { page, popup, settings, options, cartConfigs } (object or JSON string). Required unless draft_id is given. The compacted tree from get_page can be edited and sent back AS-IS — sparse nodes are re-hydrated from factory defaults (a full tree also works).
dry_runNoDefault TRUE — validate, cache the source as draft_id, and preview without sending. Set false to actually save.
page_idNoThe page id to update (must be owned by the account). Required unless draft_id is given (the page_id is stored in the draft).
draft_idNoA draft_id from a previous update_page call (dry_run=true or a timed-out/failed update). Loads the cached source, so the full JSON is not re-sent; covers the dry-run → real call step and retries after a timeout.
base_versionNoThe page's source_version as returned by get_page. When it no longer matches the live page, the save is rejected rather than reverting edits made in the Webcake editor meanwhile. Optional — when omitted, the server uses the version it recorded at this session's last read or write of the page.
organization_idNoOrganization the page(s) belong to: an organization id, or 'personal' (= no organization). Settle it first (list_organizations; ask the user when the account has 2+). When omitted: the org remembered for this page_id (from get_page), else WEBCAKE_ORG_ID / x-webcake-org-id, else the account's only organization, else ok:false reason:'organization_required' with the list.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.16.1
    • addedInput schema / properties / organization_id
      Added value: +{
      +  "description": "Organization the page(s) belong to: an organization id, or 'personal' (= no organization). Settle it first (list_organizations; ask the user when the account has 2+). When omitted: the org remembered for this page_id (from get_page), else WEBCAKE_ORG_ID / x-webcake-org-id, else the account's only organization, else ok:false reason:'organization_required' with the list.",
      +  "type": "string"
      +}
  2. Changed4 schema fields changedv1.5.11
    • changedInput schema / properties / base_version / description
      Previous value: -"The source_version get_page returned for this page. When it no longer matches the live page the save is REJECTED instead of reverting whatever was edited in the Webcake editor meanwhile. Optional — omit it and the server uses the version it recorded on your last read/write of this page."New value: +"The page's source_version as returned by get_page. When it no longer matches the live page, the save is rejected rather than reverting edits made in the Webcake editor meanwhile. Optional — when omitted, the server uses the version it recorded at this session's last read or write of the page."
    • changedInput schema / properties / draft_id / description
      Previous value: -"A draft_id from a previous update_page call (dry_run=true or a timed-out/failed update). Loads the cached source — no need to re-send the full JSON. Use for dry-run → real call transitions and retrying after a timeout."New value: +"A draft_id from a previous update_page call (dry_run=true or a timed-out/failed update). Loads the cached source, so the full JSON is not re-sent; covers the dry-run → real call step and retries after a timeout."
    • changedInput schema / properties / force / description
      Previous value: -"Default false. true = save even when the page changed outside this session, discarding those changes. Only pass it after the user has said to."New value: +"Default false. true saves even when the page changed outside this session, discarding those outside changes."
    • addedInput schema / properties / source / anyOf
      Added value: +[
      +  {
      +    "additionalProperties": {},
      +    "type": "object"
      +  },
      +  {
      +    "type": "string"
      +  }
      +]
  3. Changed2 schema fields changedv1.5.2
    • addedInput schema / properties / base_version
      Added value: +{
      +  "description": "The source_version get_page returned for this page. When it no longer matches the live page the save is REJECTED instead of reverting whatever was edited in the Webcake editor meanwhile. Optional — omit it and the server uses the version it recorded on your last read/write of this page.",
      +  "type": "string"
      +}
    • addedInput schema / properties / force
      Added value: +{
      +  "description": "Default false. true = save even when the page changed outside this session, discarding those changes. Only pass it after the user has said to.",
      +  "type": "boolean"
      +}
  4. First observedv1.5.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, and the description goes well beyond them: it names the exact failure reasons (page_changed_externally, unverified_overwrite), explains that an unverified save deletes live element ids, discloses that the published build is not refreshed, and notes the Webcake-credentials requirement. The dry-run caching/draft_id mechanism is behavior an agent could not infer from any structured field.

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 and scope, then concurrency, then the dry-run workflow, then credentials — a logical order with no filler. It is very dense (long semicolon-chained sentences) and would scan faster split into short bullets, but every sentence carries information.

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 7-parameter destructive write with no output schema, the definition covers validation, concurrency, override, draft resumption, and ownership/credentials. The one remaining gap is the successful real-save response shape — it describes only the masked request returned by a dry run, not what a committed update returns.

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 per-parameter baseline is 3. The description still adds value by stitching the parameters into a workflow the schema documents only in isolation: dry_run=true → draft_id → dry_run=false, base_version falling back to the server-recorded version, and force discarding outside changes.

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 ('Replaces an existing page's stored source with an edited tree') and immediately bounds the scope ('source only; the published build is not refreshed'), which separates it from publish_page and from incremental-edit siblings. An agent can tell what this does and what it does not do without opening 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 Guidelines4/5

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

Gives clear operational context: dry_run defaults to true and must be set false to actually save, a draft_id lets you resume from a dry run or a timed-out update, and force:true overrides the concurrency refusal. It never names a sibling alternative (e.g. patch_page for partial edits or validate_page for a no-write check), so routing between tools is left partly to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.