Skip to main content
Glama

pages_replace

Find and replace text in a Pages document without altering formatting, then save. Fails if the text is not found, leaving the file unchanged.

Instructions

Replace text in an existing Pages document, and save it.

Preserves formatting: only the paragraphs containing the searched string are touched, and the others keep their size, colour and style. This is the tool for filling in a template — a contract, a letter — by replacing placeholders.

If the string does not appear, the document is left untouched and the call fails: better an error than a "done" on a file that stayed the same.

Args: path: the .pages file to modify. search: the text to find. Does not cross line breaks: look for something that sits inside a single paragraph. replacement: the text that takes its place.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
searchYes
replacementYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description carries the full burden. It discloses that formatting is preserved (only paragraphs with the match are touched), that the document is left unchanged if the string is absent, and that the call fails rather than returning a false success. This is exemplary behavioral transparency.

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 well-structured: a one-sentence summary, a paragraph on formatting preservation, a paragraph on failure behavior, and a concise Args list. Every sentence adds value, and the length is appropriate for the tool's complexity.

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?

The description covers the tool's operation, use case, parameter semantics, failure mode, and side effects (saving the document). An output schema is present, so return values don't need elaboration. It is complete for an agent to invoke correctly.

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

Parameters5/5

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

Schema coverage is 0%, so the description must explain all parameters. It does: path is '.pages file to modify', search is 'text to find' with a note about not crossing line breaks, and replacement is 'the text that takes its place'. This fully compensates for the bare schema.

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 'Replace text in an existing Pages document, and save it,' which is a specific verb-resource pair. It distinctly identifies this as the find-and-replace tool for Pages, separating it from siblings like pages_create, pages_append, and pages_read.

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?

It clearly states this is 'the tool for filling in a template — a contract, a letter — by replacing placeholders,' giving a strong use case. It does not explicitly mention alternatives or when not to use, but the template context provides clear guidance for selection.

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

Install Server

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/atipicguy/iwork-mcp'

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