Skip to main content
Glama

Pages: replace all

pages_replace_all
Destructive

Replace every occurrence of a text string throughout a .pages document body while preserving formatting, with an optional dry run to preview changes before writing.

Instructions

Replace every occurrence of find in a .pages body (needs Pages + GUI session). Rolled back if the readback disagrees. dry_run=true previews the change on a copy without touching the file. Use to change text everywhere while keeping formatting. To replace the whole body use pages_set_body; for template fields use pages_fill_placeholders.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
findYesText to find, exactly.
pathYesPath to the .pages document (absolute, or starting with ~).
dry_runNotrue = make the change on a throwaway copy, run every check, and return what would change; the file itself is not touched. Use it before broad or risky edits and show the user.
replaceYesReplacement text.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv2.4.1
    • addedInput schema / properties / dry_run / description
      Added value: +"true = make the change on a throwaway copy, run every check, and return what would change; the file itself is not touched. Use it before broad or risky edits and show the user."
    • addedInput schema / properties / find / description
      Added value: +"Text to find, exactly."
    • addedInput schema / properties / path / description
      Added value: +"Path to the .pages document (absolute, or starting with ~)."
    • addedInput schema / properties / replace / description
      Added value: +"Replacement text."
  2. First observedv2.4.0

TDQS

A4.5/5.0
Behavior4/5

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

Beyond the annotations (destructiveHint=true, idempotentHint=false), the description discloses two traits not present in structured fields: the Pages + GUI session prerequisite and the readback-based rollback on disagreement. The dry_run sentence largely restates the schema's dry_run description, so it doesn't add much incremental value, keeping this at 4 rather than 5.

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?

Four tight sentences with zero filler; the core behavior and prerequisite come first, then the safety mechanism, then routing to alternatives. Every sentence earns its place.

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?

With an output schema, full schema description coverage, and annotations covering the safety profile, the description supplies everything else an agent needs: environment prerequisite, rollback guarantee, preview mode, and sibling routing.

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

Parameters3/5

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

Schema description coverage is 100%, so find, path, replace, and dry_run are already fully documented. The description only adds that matching is body-scoped and that find is matched "exactly", which is marginal additional meaning over the schema. Baseline 3 applies.

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 and scope ("replace every occurrence of `find` in a .pages body") along with the required environment, and explicitly names the two sibling tools it is not (pages_set_body, pages_fill_placeholders). An agent can distinguish this from all other Pages tools without opening a schema.

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?

Gives positive guidance ("use to change text everywhere while keeping formatting"), names the alternative for whole-body replacement, and names the alternative for template fields. It even routes risky usage to the dry_run flow, so the when-to-use decision is fully covered.

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