Skip to main content
Glama

find_replace

在工作表中查找并替换文本(批量修正数据)。

Instructions

在工作表中查找并替换文本(批量修正数据)。

参数:

  • file_path:工作簿路径

  • find:要查找的文本

  • replace:替换为(传空串表示删除匹配到的文本)

  • cell_range:限定区域如 "A1:D100";省略则整表

  • match_case:是否区分大小写(默认否)

返回:替换的单元格数量与明细(受数量上限保护)。

Input Schema

NameRequiredDescriptionDefault
findYes
sheetNo
replaceNo
file_pathYes
cell_rangeNo
match_caseNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.1

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that an empty replace string deletes matched text, that cell_range omission targets the whole sheet, the match_case default, and that the return is count-plus-details '受数量上限保护' (guarded by a count limit). It omits permission/reversibility context for this mutation, which keeps it below 5.

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?

Front-loaded purpose sentence followed by a clean parameter list and a return line. Well-scannable with no filler, though the parameter list is formatted as prose bullets rather than tight mappings.

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 6-param mutation tool with no annotations and no output schema, the description supplies the return value and most parameter behavior. It is only incomplete in omitting the 'sheet' parameter, so an agent cannot tell how multi-sheet workbooks are scoped.

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 0%, so the description must compensate and largely does, documenting find, replace (with the delete-on-empty semantic not obvious from schema), cell_range (with an example "A1:D100" and whole-sheet default), match_case, and file_path. The 'sheet' parameter (which sheet to operate on) is left undocumented in both schema and description, a real gap.

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 opening line gives a specific verb+resource ('在工作表中查找并替换文本') and adds the intent '(批量修正数据)'. It is easily told apart from siblings like write_cells or read_range. It doesn't explicitly name an alternative, but the purpose is unambiguous.

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 only implied via '(批量修正数据)'. There is no explicit when-to-use vs. write_cells, no exclusion for non-text values, and no statement of prerequisites. An agent must infer the context.

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