Edit a wiki page (patch for small changes)
wiki_edit_pageModify an existing wiki page by appending content, replacing a section or body, or applying precise patch edits with exact text matching. Add or remove tags, sources, summary, and type values.
Instructions
SMALL EDITS: USE mode="patch" with edits=[{old_text:"exact existing text",new_text:"replacement"}]; omit content and section. Each old_text must match the body exactly once; edits run in order and all must succeed before saving. mode="append" adds content; "replace_section" replaces a section (give section); "replace_all" replaces the body. summary/type replace values; sources/tags are added (replace_all replaces sources); remove_sources deletes entries.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | "append", "replace_section", "replace_all" or "patch" (small edits). | |
| tags | No | Tags to add (optional). | |
| type | No | New page type (optional): source, entity, concept, comparison, synthesis, overview. | |
| edits | No | Required for patch only: 1–100 edits, applied in order. Invalid edits save nothing. | |
| title | Yes | Title of the existing page. | |
| content | No | Markdown to add or replace with. Omit for patch; may be "" for metadata-only append. | |
| section | No | Required for mode="replace_section": the heading text, e.g. "Early life". | |
| sources | No | Raw sources to add (optional). | |
| summary | No | New one-sentence summary (optional). | |
| sandbox_id | Yes | Your sandbox id from wiki_start. | |
| remove_sources | No | Sources to remove from the list (optional), e.g. a deleted page. |