Literal find/replace edits on a draft page (auto-opens from published). find is not regex; 0 matches -> E_PATCH_NO_MATCH, N matches without occurrence -> E_PATCH_AMBIGUOUS (no write). occurrence: "first" or "all". if_revision:null pins to the revision read. Caps: 1..20 edits, find <=2000 B, replace <=5000 B, total <=20000 B. Not for new pages or publishing.
| Name | Type | Required | Description |
|---|---|---|---|
| request_id | string | Yes | Unique mutation ID. Reuse only to replay identical arguments; use a new ID for changed arguments or after E_CONFLICT. |
| site_id | uuid | Yes | Site UUID from list_sites or create_site. |
| path | string | Yes | Page URL path, e.g. '/pricing'. Leading slash required. |
| if_revision | string or null | Yes | Current selected revision from get_site, list_pages or get_page. Use null only when source is none. Refresh after E_CONFLICT. |
| expected_page_type | enum html | jsx | markdown | svg | mermaid | No | Optional guard: if set, the current page's type must match, otherwise the tool returns E_CONFLICT and no write occurs. |
| edits | array of object | Yes | Ordered list of literal find/replace edits to apply sequentially. 1..20 items. Combined find + replace bytes across all edits must be <= 20000. Atomic: if any edit fails validation, no write occurs. |
| Name | Type | Description |
|---|---|---|
| page | object | — |
| content | object | — |
| idempotency_replay | boolean | — |
patch_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 38 Sentway tools. See connecting over MCP.