Skip to main content
Glama

Replace in cells

replace_cells
Destructive

Replace literal text in Excel cells or sheets, including formula text, then retype entries like Excel. Returns the cells changed.

Instructions

Replace text in cells, like Excel's Replace All (literal, no wildcards). The result is retyped as in Excel: '1' becomes a number, '=...' a formula. Returns cells changed.

Input Schema

NameRequiredDescriptionDefault
pathYes
exactNoMatch whole cells.
queryYes
sheetNoDefault: all sheets.
in_formulasNoAlso replace inside formula text.
replacementYesText to put in its place; '' deletes.
case_sensitiveNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true/non-idempotent/not read-only, so the safety profile is covered. The description adds genuinely non-obvious behavior: literal matching (no wildcards) and Excel-style auto-retyping ('1' becomes a number, '=...' a formula), a subtle coercion side effect not captured by annotations or schema. It could go further on undo/permission constraints.

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?

Three short sentences, front-loaded with the core action, then the matching rule, then the retyping behavior, then the return. No filler; every clause carries information.

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 a destructive mutation with no output schema, the description covers what it does, the matching rule, the retyping consequence, and explicitly states it returns cells changed. Annotations carry the destruction/safety burden. Only minor gaps remain (undoability, scope beyond default all-sheets).

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 coverage is 57%; exact, in_formulas, replacement and sheet have schema descriptions, but path, query, and case_sensitive do not. The description adds matching semantics ('literal, no wildcards') that partially compensate for the undocumented query param, but it never clarifies case_sensitive, exact, or formula-text behavior, so it only partially earns its keep.

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+resource ('Replace text in cells') and scopes it with the Excel 'Replace All' analogy plus 'literal, no wildcards'. This distinguishes it from siblings like find_cells (which only locates) and transform_range, letting an agent identify its role without opening a schema.

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 Excel Replace All framing implies when the tool applies, but no explicit alternatives or exclusions are named (e.g., vs find_cells for search-only, or write_range for targeted edits). Usage is inferable rather than stated.

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