Pages

save_page

Author or replace a single page in the site's current draft, opening a draft from the published version if none exists. If you have not read the Sentway authoring guide in this session, call get_authoring_guide first for the authoring conventions (page types, paths, assets). Every site needs a homepage at path '/' ('/index' is an ordinary page and does NOT serve at the site root); the returned homepage_missing tells you whether one still has to be written. Use when adding or fully replacing one page's source. Do not use to patch fragments or to publish.

Behaviour

Effect
Destructive. It can remove or overwrite existing data.
Repeat calls
Idempotent. Repeating the same call produces the same result.
Plan
Available on every plan, including free.

Parameters

NameTypeRequiredDescription
request_idstringYesUnique mutation ID; reuse only to replay identical arguments, new ID after E_CONFLICT.
site_iduuidYesSite UUID from list_sites.
pathstringYesPage URL path, e.g. '/pricing'. Leading slash required. '/' is the site's homepage; '/index' is an ordinary page and will NOT serve at the site root.
page_typeenum
html | jsx | markdown | svg | mermaid
YesPage source language: html, jsx, markdown, svg or mermaid.
sourcestringYesComplete replacement source for the page. UTF-8, maximum 500 KB.
titlestring or nullYesPage title, or null. Maximum 200 characters.
if_revisionstring or nullYesSelected revision from get_site, list_pages or get_page; null only when source is none. Refresh on E_CONFLICT.
shellobjectNoEmbed shell settings. Only valid when page_type is svg or mermaid.

Returns

NameTypeDescription
pageobject-
contentobject-
idempotency_replayboolean-
homepage_missingbooleanTRUE when the site's current authoring version has no page at '/'. A site with no '/' page 404s at its root URL. '/index' does not count.

Using it

save_page is called by an AI assistant connected to Sentway over MCP, not by hand. Point the assistant at the Sentway MCP endpoint and complete the OAuth flow, and the tool becomes available in the same session as the other 56 Sentway tools. See connecting over MCP.