update_toggle
Update a toggle's body content by searching for its title on a page and replacing its children with the provided markdown. Use dry_run to preview changes before execution.
Instructions
DESTRUCTIVE — no rollback: this tool preserves the matched toggle container block ID, then deletes its body children and appends replacement body blocks. Child block IDs inside the body change, and if the write fails mid-call the toggle can be left partially or fully emptied. For irreplaceable content, duplicate_page the target first so you have a restore point.
Update the body of one toggle by title from a page. Searches recursively and matches plain toggle blocks plus toggleable heading_1, heading_2, and heading_3 blocks using case-insensitive trimmed text. The markdown is replacement body content, not a wrapper that renames the toggle. If the markdown parses as one matching top-level toggle or toggleable heading wrapper, that wrapper is ignored and only its children are used as the replacement body.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page_id | Yes | Page ID | |
| title | Yes | Toggle title to find (case-insensitive) | |
| markdown | Yes | Replacement markdown for the toggle body | |
| dry_run | No | Preview validation and planned effect without mutating Notion. Default false. |