Skip to main content
Glama

Find and Replace Doc

find_and_replace_doc
Destructive

Find and replace text anywhere in a Google Doc without calculating indices. Replace placeholders or update specific phrases with targeted changes.

Instructions

Finds and replaces text throughout a Google Doc. No index calculation required.

This is the safest way to update specific text in a document because it does not require knowing any indices. Use this tool when you need to:

  • Replace placeholder text (e.g., {{TITLE}}) with real content

  • Update specific words or phrases throughout the document

  • Make targeted text changes without risk of index errors

For building documents from scratch, consider inserting text with unique placeholders via batch_update_doc, then using this tool to replace them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tab_idNoOptional ID of the tab to target
find_textYesText to search for
match_caseNoWhether to match case exactly
document_idYesID of the document to update
replace_textYesText to replace with
user_google_emailYesUser's Google email address

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already indicate destructiveHint=true and idempotentHint=false, so the safety burden is partially carried there. The description adds useful context that replacement happens 'throughout' the document and frames it as the 'safest way' to avoid index errors. It does not contradict the annotations, and no annotation contradiction is present.

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

Conciseness4/5

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

The description is front-loaded with the core behavior and then provides a clear, scannable bullet list of use cases. It is slightly repetitive with 'safest way' and 'without risk of index errors,' but overall each section earns its place and the structure supports quick understanding.

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?

Given that an output schema exists and parameter coverage is complete, the description provides enough context for an agent to select and invoke the tool correctly. It covers scope, use cases, and a relevant alternative workflow. It could be more complete by explicitly noting that all occurrences are replaced or by naming index-based sibling tools, but these are gaps rather than blockers.

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 the input schema already documents all six parameters. The description adds context around placeholder replacement and content updating, which helps illustrate find_text and replace_text usage, but does not substantially deepen the meaning of individual parameters beyond the 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 a specific verb and resource: 'Finds and replaces text throughout a Google Doc.' It also adds a distinctive behavioral claim, 'No index calculation required,' which differentiates it from index-based document editing tools. The use-case bullets reinforce what the tool is for.

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 gives explicit when-to-use scenarios: replacing placeholders, updating words or phrases, and making targeted changes without index errors. It also names an alternative workflow using batch_update_doc for building documents from scratch. However, it does not explicitly contrast itself with sibling tools like modify_doc_text when index-based edits are needed.

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/WorldCentralKitchen/google_workspace_mcp'

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