update_toggle
Replace the body of a Notion toggle by title using markdown. The toggle container stays, while existing child blocks are deleted and replaced with native Notion blocks converted from your markdown.
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, and the server converts it into native Notion blocks, not flat/plain text. The server automatically handles Notion API limits: batches more than 100 child blocks, splits rich text over 2000 characters, and writes deeply nested blocks in additional passes, so callers can send a full multi-section toggle tree in one call with no need to pre-chunk or pre-split. 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. For supported markdown syntax, read resource easy-notion://docs/markdown. Page mentions: @Title. Returns: { success: true, block_id, type, deleted, appended }, where deleted and appended are counts, plus deleted_blocks for the deleted top-level body blocks when present and block_map for the top-level appended body blocks when present. A dry run instead returns { success: true, dry_run: true, operation, page_id, title, block_id, type, deleted, appended, would_delete_block_ids, append_parent_id }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Toggle title to find (case-insensitive) | |
| dry_run | No | Preview validation and planned effect without mutating Notion. Default false. | |
| page_id | Yes | Page ID | |
| markdown | Yes | Replacement markdown for the toggle body | |
| return_block_map | No | Include block_map in the response. Default true. Set false to skip the per-block id list when you do not plan to edit individual blocks. | |
| collapse_soft_wraps | No | Collapse single line breaks to spaces per CommonMark before writing. Default false (single line breaks are kept as they are today). Recommended when uploading hard-wrapped prose files (e.g. repo markdown wrapped at 78 columns). Do not use when re-uploading content read from Notion, or intentional line breaks will be lost. Blank lines and code blocks are unaffected. Note: replace_content renders an in-paragraph line break as a separate paragraph regardless of this option. |