Skip to main content
Glama
alxspiker

MCP Server for FTP Access

Edit File

edit-file
Destructive

Replace an exact string in a remote FTP text file without re-uploading the entire content; use replaceAll for multiple matches.

Instructions

Edit a text file on the FTP server by replacing an exact string, without re-uploading the whole file content. oldText must match exactly (including whitespace) and be unique in the file unless replaceAll is set.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
newTextYesText to replace it with
oldTextYesExact text to find in the file
remotePathYesPath of the file on the FTP server
replaceAllNoReplace every occurrence instead of requiring oldText to be unique (default: false)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileSizeYes
remotePathYes
replacementsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.2.2
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedOutput schema / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / fileSize / description
      Removed value: -"Size of the file in bytes after the edit"
    • removedOutput schema / properties / replacements / description
      Removed value: -"Number of occurrences replaced"
  2. Addedv1.2.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, readOnlyHint=false, and idempotentHint=false, so the mutation/safety profile is covered. The description adds meaningful behavioral context beyond that: it discloses the exact-string replacement mechanism and the critical constraint that oldText must match including whitespace and be unique unless replaceAll is set.

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?

Two sentences with no filler. The purpose and efficiency benefit are front-loaded, followed by the key constraint, making it easy to scan and act on.

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?

With an output schema present, return values needn't be explained, and annotations cover the safety profile. The description covers the mechanism and the main gotcha (exact match, uniqueness, replaceAll), though it omits failure behavior when oldText is not found or not unique, which would be helpful for a mutation tool.

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 four parameters including oldText's exact-match nature and replaceAll's uniqueness-bypass behavior. The description reinforces the exact-match/whitespace requirement, adding marginal emphasis but no new semantic detail beyond what the schema provides.

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 names a specific verb (Edit), resource (a text file on the FTP server), and mechanism (replacing an exact string without re-uploading the whole file content). That mechanism implicitly distinguishes it from siblings like upload-file and append-file, so an agent can route correctly without opening schemas.

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 phrase 'without re-uploading the whole file content' implies the tool is for small, targeted edits rather than full-file replacement, which is useful implied guidance. However, it never explicitly states when to choose this over upload-file or append-file, nor does it list prerequisites, so usage remains inferred rather than stated.

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