Skip to main content
Glama

Find and Replace in Document

find_and_replace

Find and replace text in document paragraphs, headings, and titles. Preview changes with dry run mode.

Instructions

Find and replace text across all Y.Text fields in a document (paragraphs, headings, titles). matchAll defaults to true. Use dryRun=true to preview before applying.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceIdNo
docIdYesThe doc to search in.
searchYesText to find (must not be empty).
replaceYesReplacement text.
matchAllNoReplace all occurrences (default: true).
dryRunNoIf true, only report matches without replacing (default: false).
Behavior3/5

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

With no annotations, the description bears the full burden of behavioral disclosure. It correctly implies mutation ('find and replace') and highlights the dry-run preview feature, but it does not clarify other behaviors such as whether the operation is idempotent, what happens if search is not found, or any authentication requirements.

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 extremely concise: two sentences, front-loading the purpose, with no waste. Every sentence adds value.

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

Completeness4/5

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

For a tool with 6 parameters and no output schema, the description covers the primary use case, scope, and key parameters (dryRun, matchAll). It lacks details on return behavior and case sensitivity, but overall provides sufficient context for an AI agent to use the tool correctly.

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 83%, so the schema already documents most parameters. The description adds context about the scope ('across all Y.Text fields') and reiterates defaults, but it does not compensate for the undocumented workspaceId parameter or provide meaning beyond the schema for replace.

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 clearly states the action ('find and replace text') and specifies the resource ('across all Y.Text fields in a document (paragraphs, headings, titles)'). It is specific and distinguishes the tool from siblings like replace_doc_with_markdown, which operates on the entire document.

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?

The description provides useful operational guidance: it explains the default behavior of matchAll and suggests using dryRun=true for preview. However, it does not explicitly state when to use this tool versus alternatives or when not to use it, which would improve clarity.

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/DAWNCR0W/affine-mcp-server'

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