Skip to main content
Glama

easy_replace

Replaces text in files using fuzzy matching that normalizes whitespace and preserves indentation, with automatic backup for safe code refactoring.

Instructions

Fuzzy string replacement in files with smart matching

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesThe absolute path to the file where text replacement should be performed.
old_textYesThe text to search for and replace. Can be exact text or pattern.
new_textYesThe replacement text to substitute for the old text.
fuzzy_matchNoWhether to use fuzzy matching that normalizes whitespace and handles indentation. Defaults to true for flexible matching.
backupNoWhether to create a backup file before making changes. Defaults to true for safety.
Behavior3/5

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

The description adds context about whitespace normalization and indentation preservation beyond annotations (none provided). It implies file modification but doesn't explicitly state side effects, error handling, or permission requirements.

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?

The description is very short (one sentence) but lacks structure or front-loading of critical details. It could be more informative without being verbose.

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?

No output schema is provided, and the description does not explain the return value or behavior (e.g., success/failure, modified file contents). The tool has 5 parameters, but the high-level description does not cover enough context for an agent to use it fully.

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 already documents all parameters. The top-level description adds no additional meaning beyond the schema's parameter descriptions.

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 clearly states 'Fuzzy string replacement in files with smart matching', specifying the verb (replace) and resource (files). It distinguishes itself from siblings by focusing on fuzzy replacement, but does not explicitly contrast with similar file manipulation tools.

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 guidance on when to use this tool versus alternatives. It does not mention prerequisites, conditions for use, or when to prefer sibling tools like find_files or list_files.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ZachHandley/ZMCPTools'

If you have feedback or need assistance with the MCP directory API, please join our Discord server