Skip to main content
Glama
gworkspace-mcp
by ctschak

Find and replace

sheets_find_replace

Find and replace text across a Google Sheets range, one tab, or all tabs with optional regex, case, and whole-cell matching; preview changes with dry run and return the number of replacements.

Instructions

Find and replace across a range, a tab, or every tab. Optional regex, case and whole-cell matching. Returns the number of occurrences changed. Supports dryRun.

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": {
      "spreadsheet": "<spreadsheet>",
      "find": "<find>",
      "replacement": "<replacement>"
    },
    "name": "sheets_find_replace"
  }
}

Input Schema

NameRequiredDescriptionDefault
findYesText to find.
rangeNoLimit to an A1 range within `sheet`.
sheetNoLimit to one tab, by title or sheetId. Omit with `range` unset to search every tab.
dryRunNoWhen true, returns the exact API request that would be sent plus an impact summary, and sends nothing.
accountNoGoogle account to act as. Optional when one account is authorised or a default is set; required otherwise.
matchCaseNo
replacementYesReplacement text.
spreadsheetYesSpreadsheet URL or file id. Both accepted; a URL has its id extracted.
searchByRegexNoTreat `find` as a regular expression.
includeFormulasNoAlso search formula text, not just values.
matchEntireCellNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose two important traits: the return value (count of occurrences changed) and dryRun support. However, it omits whether the change is reversible, whether it touches formulas by default, and what authorization is required, which matter for a mutation tool.

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?

Three short, front-loaded sentences with no filler; scope comes first and return/dryRun behavior last. The 'Supports dryRun' fragment is terse but earns its place by flagging a safety-relevant capability early.

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 an 11-parameter mutation tool with no annotations and no output schema, the definition covers operation, scope, matching options, return value, and dry-run. Remaining gaps (reversibility, formula handling, auth) are modest given the fairly rich schema descriptions.

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 already 82%, so the baseline is 3; the description adds value by grouping the optional matching modifiers (regex, case, whole-cell) into one recognizable sentence that maps to searchByRegex, matchCase, and matchEntireCell, and by clarifying the scope relationship between range, sheet, and every tab.

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?

States a specific verb and resource (find and replace in a spreadsheet) plus the three scopes it can operate at: range, tab, or every tab. An agent can distinguish this from docs_replace_text on resource alone and from sheets_read/sheets_write by the operation described.

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?

Usage context is implied by the scope sentence and the mention of optional regex/case/whole-cell matching, but there is no explicit when-to-use-vs-alternative guidance and no when-not statement. Nothing tells the agent to prefer sheets_batch_update_raw or sheets_write for non-textual edits.

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