replace_content
Atomically replace a Notion page's content with markdown, preserving block IDs and inline comments. Unmatched blocks get new IDs; unsupported types like child pages are dropped.
Instructions
Replaces all page content with the provided markdown atomically (one Notion API call). Notion's atomic markdown endpoint converts the markdown to native Notion blocks in that one API call. On matched blocks Notion preserves the original block IDs, so deep-link anchors (#block-id) and inline-comment threads attached to those blocks survive the edit. Unmatched blocks (returned in warnings with code unmatched_blocks) are replaced with new IDs.
NOT preserved across replace_content: child_page subpages, synced_block instances, child_database views, and link_to_page references on the source page — Enhanced Markdown has no input form for these, so they are dropped from the new page content. If the source contains them, use duplicate_page first or edit those types via the Notion UI.
Bookmarks and embeds round-trip as bare URLs (Notion auto-links) and surface a bookmark_lost_on_atomic_replace warning so callers know the rich-bookmark UI is lost. For supported markdown syntax and warning details, read resources easy-notion://docs/markdown and easy-notion://docs/warnings. Returns: { success: true }, optionally truncated: true, optionally warnings with entries such as { code: "unmatched_blocks", block_ids: [...] }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | Preview validation and planned effect without mutating Notion. Default false. | |
| page_id | Yes | Page ID | |
| markdown | Yes | Replacement markdown content |