Skip to main content
Glama

replace_in_sheet

Find and replace text across an entire worksheet, returning the number of cells changed. Handles merged and hidden cells like Excel.

Instructions

Find and replace text across a whole worksheet (substring match per cell by default). Returns the number of cells changed. Uses findAll so merged/hidden cells behave like the Excel UI.

Input Schema

NameRequiredDescriptionDefault
findYesText to find.
replaceYesReplacement text.
matchCaseNoCase-sensitive search. Default false.
sheetNameNoWorksheet name. Defaults to the active worksheet.
workbookIdNoTarget workbook ID from list_workbooks. Optional when only one workbook is connected.
completeMatchNoMatch the entire cell contents. Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral burden. It discloses the return value (number of cells changed) and a key behavior (findAll mimics Excel UI for merged/hidden cells), but omits mutation side effects, permissions, reversibility, and formula handling.

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 three tight sentences with zero waste: purpose first, then return value, then a behavioral note. It is appropriately sized and front-loaded, with every sentence earning its place.

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 the fully documented schema and absence of an output schema, the description covers the essential return value and key behavior. It lacks some mutation-specific context (e.g., permissions, formula handling) but is largely complete for an agent to call 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 100%, so the schema fully documents all six parameters. The description adds only marginal parameter context via 'substring match per cell by default,' which relates to completeMatch but does not go beyond schema descriptions. Baseline 3 is appropriate.

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?

The description states a clear verb and resource: 'Find and replace text across a whole worksheet.' It implicitly distinguishes from a range-based find by specifying 'whole worksheet,' but does not name alternatives like find_in_range. This gives a solid purpose with minor sibling differentiation left implicit.

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 is implied by 'across a whole worksheet' and 'substring match per cell by default,' suggesting when to use it. However, there is no explicit guidance on when to use this versus find_in_range or replace_text, nor any exclusions or prerequisites.

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