Skip to main content
Glama
chaodongzhang

gemini-cli-bridge

Edit

Edit

Replace text in a specified file by finding a string and substituting it, with count=0 replacing all matches and returning the number replaced.

Instructions

String replace; count=0 means replace all. Return JSON {"replaced": n}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
findYes
pathYes
countNo
replaceYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

C2.4/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It discloses the count=0 semantics and the return shape, but says nothing about whether the file is created if missing, what happens when find has no match, whether the operation is destructive/irreversible (despite using 'replaced: n' in the return shape), or any permission/error behavior for a file-mutating tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short clauses with no filler and the key behavior front-loaded, so it is efficient. However the terseness tips into under-specification rather than purposeful brevity, and the return-value clause duplicates the existing output schema.

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?

With an output schema present, the return-value sentence is redundant and could be dropped, yet the description still omits critical context for a file-mutating tool with zero annotations and zero schema descriptions. Nothing explains file resolution, error behavior, or how this differs from sibling write/read tools.

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%, so the description must compensate, and it only clarifies one of four parameters ('count=0 means replace all'). The semantics of path, find and replace are left entirely to the parameter names, and the description never states that path is a file, whether wildcards/recursion apply, or how find/replace strings are matched.

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

Purpose3/5

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

The description says 'String replace', which is a specific operation but never states the resource: that it edits a file at a path. Against siblings like WriteFile, ReadFile and SearchText, an agent cannot tell from the description alone that this performs in-place file text substitution rather than an in-memory or query operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance and no reference to any alternative such as WriteFile for whole-file writes or SearchText for locating matches. The tool name 'Edit' is generic and the description offers nothing to disambiguate the choice.

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