Skip to main content
Glama
Google Workspace MCP connector

Google Workspace MCP connector

by animesh-ex

docs_replace_text

Find and replace text throughout a Google Doc to fill template placeholders or update repeated content without manual edits.

Instructions

Find and replace text throughout a Doc (e.g. fill {{placeholders}} in a template).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "documentId": "<documentId>",
      "replacements": "<replacements>"
    },
    "name": "docs_replace_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
documentIdYes
replacementsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare it is a non-read-only, open-world, non-destructive mutation, so the safety profile is covered. The description adds the useful scope hint that replacement happens 'throughout' the document rather than at one location, but says nothing about whether headers/footers/tables are covered, whether all matches are replaced, or whether the original text is recoverable. These are meaningful gaps for an overwrite operation, so it does not contradict annotations but falls short of rich disclosure.

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?

A single front-loaded sentence with no filler; the purpose comes first and the example is compactly parenthesized.

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

Completeness2/5

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

For a mutation tool with an undescribed two-parameter schema and no output schema, the definition does far too little: it omits parameter meaning, case-sensitivity behavior, replacement scope, and any indication of what the call returns (e.g. counts of replacements).

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

Parameters2/5

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

Schema description coverage is 0% for two required parameters, so the description carries the full burden and mostly fails: it never mentions documentId, the replacements array, or the find/replace/matchCase fields with matchCase defaulting to true (case-sensitive by default is a significant behavior). The placeholder example only obliquely hints at find/replace semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource pair: 'find and replace text throughout a Doc', with an example clarifying the templating use case. The 'throughout a Doc' wording implicitly separates it from the Slides sibling and from doc-editing tools, though it does not name an alternative explicitly.

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 parenthetical 'e.g. fill {{placeholders}} in a template' gives one concrete when-to-use scenario, which is better than nothing. However, there is no guidance on when not to use it (e.g. vs docs_batch_update for structured edits) and no stated prerequisites such as edit permissions.

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