Skip to main content
Glama
mocchalera

xserver-files-mcp

by mocchalera

Replace text in remote file

replace_in_file
Destructive

Replace all exact text matches in a file and write changes back, with backup by default.

Instructions

Read a file, replace all exact text matches, and write it back with backup by default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
findYesExact text to replace.
pathYesFile path relative to the configured domain root.
backupNoBack up existing file before writing.
domainYesConfigured domain root to operate under.
dry_runNoReturn preview without writing.
replaceNoReplacement text.
server_idNoServer profile id. Defaults to config.defaultServer.
backup_labelNoBackup label used in the generated filename.
Behavior4/5

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

Annotations already indicate destructive behavior (destructiveHint=true). The description adds context by noting that replacements are exact text matches and that a backup is created by default, which goes beyond the annotation's binary safety signal.

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?

A single sentence that is front-loaded with the core operation and includes the key default behavior. Every word earns its place with no redundancy.

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 8-parameter schema with 100% coverage and destructive annotations, the description adequately captures the overall workflow. It does not mention return values, but no output schema exists, and the process is clear enough for an agent to invoke correctly.

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?

The schema covers all 8 parameters with descriptions, so the baseline is 3. The description adds slight value by clarifying that 'find' replaces ALL exact matches and that backup is default, reinforcing parameter semantics beyond the schema.

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?

The description clearly states the tool's action: read a file, replace all exact text matches, and write it back with backup by default. This specific verb+resource+behavior distinguishes it from siblings like read_file, write_file, and backup_file.

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 description implies usage for find-and-replace operations but does not explicitly state when to prefer this tool over a combination of read_file and write_file, nor does it mention exclusions or alternatives. No sibling tools are named.

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/mocchalera/xserver-files-mcp'

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