Patch Page
patch_pageApply targeted changes to an existing page without sending the full content. base_version_hash is optional — if omitted, find/replace acts as the natural conflict guard. Operations: replace, delete, insert_before and insert_after, each anchored on a find string that must match exactly once. Prefer this over update_page for small edits; use update_page to replace the whole page.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project_id": "<project_id>",
"slug": "<slug>",
"patches": "<patches>"
},
"name": "patch_page"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | The page slug to patch | |
| patches | Yes | Array of patch operations. Each patch needs operation and find (exact string, must match exactly once in the page content). replace: also send replace (the new string). insert_before / insert_after: also send content (inserted directly before or after the find string). delete: removes the find string. | |
| project_id | Yes | The project ID | |
| patch_summary | No | Brief description of what was changed (optional, stored in version history) | |
| base_version_hash | No | Optional. The current version_hash of the page. If provided and mismatched, returns 409 with details. If omitted, find/replace handles conflicts naturally. |