Skip to main content
Glama

Find and Replace Text

notion_replace_text

Find and replace text across a Notion page, preserving formatting and mentions. Preview changes with dry_run, then revert all edits together via undo.

Instructions

Find and replace text across a page while keeping bold/italic/links/colors and mentions intact: every text block, table cell, and code caption, plus the page title (include_title). Supports regex with $1-style groups. Defaults to dry_run=true, which shows every change (before/after) so you can confirm. Matches that cross a mention or equation are skipped and reported. Sub-pages are separate documents and aren't searched. All changes revert together with notion_undo.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
findYes
pageYes
regexNo
dry_runNo
replaceYes
block_idsNoLimit to these blocks.
include_titleNoAlso replace in the page title.
case_sensitiveNo
max_replacementsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.10.0

TDQS

A4.7/5.0
Behavior5/5

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

The description goes well beyond the annotations (which only say non-read-only, non-destructive, non-idempotent, open-world). It discloses formatting preservation, regex support with $1 groups, dry_run default with before/after preview, cross-mention matches being skipped/reported, sub-page exclusion, and that changes revert together with notion_undo – all critical behavioral traits for safe invocation.

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?

Single dense paragraph, front-loaded with core purpose and scope, then safety default and edge cases. Every sentence adds unique information with zero filler.

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?

For a multi-param mutation tool with no output schema and sparse schema descriptions, the description covers scope, safety, regex, formatting preservation, limitation handling, and undo integration. It provides everything an agent needs to call correctly and safely.

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 only 22%, so the description must compensate. It explains include_title, regex, dry_run, and block_ids behavior meaningfully. However, it doesn't clarify case_sensitive or max_replacements defaults, leaving two parameters (case_sensitive, max_replacements) undocumented semantically.

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?

States a specific verb+resource (find and replace text across a page) and details the exact scope: every text block, table cell, code caption, and the page title. This clearly distinguishes it from siblings like notion_update_page or notion_patch_block, which don't perform cross-page text substitution.

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

Usage Guidelines4/5

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

Explicitly mentions the default dry_run=true safety behavior and that sub-pages aren't searched, which helps an agent decide when to use this tool. It does not name alternative sibling tools for narrower edits, but the scoping ('across a page') implies when this bulk-replace approach is appropriate.

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