update_page
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
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Default false. true saves even when the page changed outside this session, discarding those outside changes. | |
| source | No | The 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_run | No | Default TRUE — validate, cache the source as draft_id, and preview without sending. Set false to actually save. | |
| page_id | No | The 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_id | No | 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. | |
| base_version | No | 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. | |
| organization_id | No | 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. |