Skip to main content
Glama
MCP Server for FTP Access

MCP Server for FTP Access

Edit File

edit-file
Destructive

Edit a text file on an FTP server by replacing an exact string, avoiding re-upload of the entire file. Requires unique oldText unless replaceAll is set.

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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "remotePath": "<remotePath>",
      "oldText": "<oldText>",
      "newText": "<newText>"
    },
    "name": "edit-file"
  }
}

Input 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

NameRequiredDescriptionDefault
fileSizeYes
remotePathYes
replacementsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.4.1
    • removedInput schema / additionalProperties
      Removed value: -false
  2. 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"
  3. Addedv1.2.0

TDQS

A4/5.0
Behavior4/5

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

Beyond the destructiveHint=true / idempotentHint=false annotations, the description discloses a real failure mode: oldText must match exactly (including whitespace) and must be unique unless replaceAll is set. That is genuine operational context. It still omits what happens on a non-unique or non-matching oldText (error vs. no-op) and any encoding/line-ending caveats.

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, front-loaded with the action and mechanism, then the constraint. Every clause carries information; nothing is padding.

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 four-parameter mutation tool with full schema coverage, an output schema, and annotations covering the safety profile, the description supplies what is missing: exact-match and uniqueness semantics. Only error behavior on a failed or ambiguous match is left unstated.

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 coverage is 100%, so all four parameters are already documented, and the description adds only the uniqueness/whitespace constraint on oldText and the effect of replaceAll. That is useful but limited added meaning over the schema, so the baseline applies.

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?

States a specific verb and resource ('Edit a text file on the FTP server') plus the mechanism ('replacing an exact string, without re-uploading the whole file content'). The 'without re-uploading' clause implicitly separates it from upload-file and append-file, so an agent can pick it without reading the schema.

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: the string-replacement mechanism tells you this is for surgical edits rather than whole-file rewrites, but the description never says when to prefer it over upload-file or append-file, nor when not to use it (e.g., large rewrites, binary files).

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