Skip to main content
Glama

docs_replaceText

Replace every instance of specified text with new text in a Google Doc to update content quickly.

Instructions

Replaces all occurrences of text with new text in a Google Doc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabIdNoTab ID (replaces in all tabs if omitted).
findTextYesText to find.
documentIdYesDocument ID or URL.
replaceTextYesReplacement text.
Behavior2/5

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

No annotations are provided, so the description carries full responsibility for behavioral disclosure. 'Replaces all occurrences' conveys the core behavior, but it does not mention that this is a mutating operation, potential side effects on formatting, or permissions required. The description is too terse to provide adequate transparency for a write tool.

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 a single sentence, front-loaded with the action, and contains no redundant words. Every word adds value.

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

Completeness3/5

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

The tool is simple, and the description covers the core function, but it lacks details like whether it applies to all tabs (though schema mentions tabId behavior), whether regex is supported, or what happens if no text is found. Given no output schema and no annotations, a bit more context would improve completeness.

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 coverage is 100%, so baseline is 3. The description adds key semantic context by specifying 'all occurrences', which clarifies that findText is global and not first-only. This adds value beyond the schema's simple 'Text to find.' definition.

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 uses a specific verb ('Replaces') and resource ('text in a Google Doc'), clearly indicating a find-and-replace operation. It distinguishes itself from sibling tools like docs_writeText (which likely writes entire content) and docs_formatText (formatting) by specifying 'all occurrences'.

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

Usage Guidelines3/5

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

The description implies usage when a find-and-replace is needed but does not explicitly state when to use this tool over alternatives or provide exclusions. No mention of alternatives like docs_writeText or docs_formatText, so the guidance is implied rather than explicit.

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/Dave-Nguyen-PM/google-workplace-mcp'

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