Patch page section
patch_pageEdit a single section of a tela wiki page instead of rewriting the whole body. Use get_page format:"map" to find the target path, then apply append, prepend, replace, or delete.
Instructions
Surgically edit ONE section of a page instead of rewriting the whole body (editor+). First call get_page format:"map" to see the section paths, then patch the target. Cheaper and safer than update_page on a long page — it never touches the rest of the document. Snapshots a revision like any edit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | page id to patch | |
| target | Yes | the section to edit, by its heading path from get_page format:"map" (e.g. 'Setup' or 'Deploy > Production'); the bare heading text also resolves | |
| content | No | markdown to insert; omit for delete | |
| operation | Yes | append (add to the end of the section's body), prepend (add right under the heading), replace (swap the section's body, heading kept), or delete (remove the heading and its body). A section means the heading AND EVERYTHING NESTED UNDER IT until the next same-or-higher heading — so replace/delete on a '##' also removes its '###' sub-sections (they come back in the response as removed_subsections), and append lands after the last of them. To edit only the prose under a heading that has sub-sections, target the sub-section instead. | |
| base_version | No | optional: the page version you last read. If the page has changed since, the patch is refused with version_conflict; re-read and reapply. Even without it, a patch never overwrites an edit made while it was being applied | |
| idempotency_key | No | optional client-generated key; a retry with the same key returns the original result instead of re-applying the patch |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | Yes | ||
| warning | No | ||
| removed_subsections | No |