Skip to main content
Glama

replace_content

Replace a Notion page's entire content in one atomic API call, preserving block anchors and inline comments, with warnings for unmatched blocks.

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. For an inline page mention, use @Title; that is a separate construct from the link_to_page block type.

Bookmarks and embeds are written as bare URLs (Notion auto-links) and surface a bookmark_lost_on_atomic_replace or embed_lost_on_atomic_replace warning so callers know the rich preview 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: [...] }, plus block_map for the resulting top-level blocks when present. A dry run returns { success: true, dry_run: true, operation, page_id, would_update: true } and optionally warnings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNoPreview validation and planned effect without mutating Notion. Default false.
page_idYesPage ID
markdownYesReplacement markdown content
return_block_mapNoInclude 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_wrapsNoCollapse 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.
Install Server

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full behavioral burden, and it delivers extensively. It discloses atomicity, block-ID preservation, unmatched block replacement, dropped page types, bookmark/embed preview loss, and warning codes. It also describes the dry-run behavior and response shape, so the agent knows exactly what to expect.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but every sentence earns its place, covering core behavior, preservation caveats, alternatives, parameter effects, docs references, and return values. The most important facts are front-loaded, with the atomic replacement behavior stated first and supporting details organized in a logical progression.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a complex tool with five parameters, no annotations, and no output schema, yet the description is nearly self-contained. It covers the return value with success/truncated/warnings/block_map details, documents the dry-run response, names warning codes, and points to docs for further detail. The only minor gap is that not every warning code is enumerated, but the description references docs and gives representative examples, which is sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3, but the description adds meaningful semantic value beyond the schema. It explains the effect of collapse_soft_wraps on single line breaks, mentions that replace_content renders in-paragraph line breaks as separate paragraphs regardless of the option, and clarifies that bookmarks/embeds are written as bare URLs. These details help the agent choose parameter values correctly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Replaces all page content with the provided markdown atomically (one Notion API call).' This makes the tool's core action unmistakable and distinguishes it from sibling tools like append_content, which adds rather than replaces content. It also clarifies that this is an all-page replacement, not a targeted edit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit when-to-use and when-not-to-use guidance, including 'use duplicate_page first or edit those types via the Notion UI' when the source contains child_page subpages or other unsupported constructs. It also provides concrete parameter-level guidance, such as recommending collapse_soft_wraps for hard-wrapped prose files and warning not to use it when re-uploading content read from Notion. This routes the agent to alternatives and away from misuse.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Grey-Iris/easy-notion-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server