Skip to main content
Glama

Upload File

upload_file
DestructiveIdempotent

Upload a text file to a MikroTik router via SFTP with FTP fallback, overwriting files of the same name. Use dry-run to test connectivity before writing.

Instructions

Upload a text file to a router, overwriting any existing file of the same name. Prefers SFTP (encrypted, over SSH) and falls back to plaintext FTP if SFTP is unavailable. Requires SSH (or FTP) access for the router user. RouterOS runs a file named *.auto.rsc as a script when it arrives over FTP. Dry-run tests connectivity only.

Input Schema

NameRequiredDescriptionDefault
nameYesTarget filename on the router (e.g. flash/my-script.rsc)
dryRunNoValidate SFTP or FTP connectivity without writing the target file
contentYesFile content to upload (text)
routerIdNoRouter ID; omit to use the default router.
confirmationTokenNoToken from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.14.1
    • addedInput schema / properties / confirmationToken
      Added value: +{
      +  "description": "Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action.",
      +  "type": "string"
      +}
  2. Changed1 schema field changedv1.11.0
    • changedInput schema / properties / dryRun / description
      Previous value: -"Validate FTP connectivity without writing the file"New value: +"Validate SFTP or FTP connectivity without writing the target file"
  3. Changed2 schema fields changedv1.6.0
    • changedInput schema / properties / routerId / description
      Previous value: -"Target router identifier from the router registry"New value: +"Router ID; omit to use the default router."
    • changedInput schema / required
      Previous value: -[
      -  "routerId",
      -  "name",
      -  "content"
      -]New value: +[
      +  "name",
      +  "content"
      +]
  4. Addedv1.5.0
  5. Removedv1.1.0
  6. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations declare destructive=true and idempotent=true, and the description materially extends them: it names the overwrite behavior, the auth prerequisite, the SFTP-to-FTP fallback, and the important gotcha that RouterOS auto-executes an uploaded *.auto.rsc over FTP. That last point is safety-critical context an agent could not infer from annotations or schema.

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?

Four tight sentences, each carrying distinct information, with the primary action and its destructive nature front-loaded. No filler or restatement of the tool name.

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?

Covers the mutation risk, auth needs, fallback transport, and dry-run semantics well for a tool with no output schema. It stops short of describing success/failure feedback or how partial-transfer errors surface, which is a modest gap for an upload operation.

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 all five parameters are already documented in the schema; the description's dry-run explanation duplicates the schema text rather than adding to it. It says nothing extra about routerId or the confirmationToken approval flow beyond what the schema already states, so the baseline 3 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 (upload), resource (text file), and the critical side effect (overwriting an existing file of the same name), which separates it from read-only siblings like list_files and get_file_content. The transfer-mechanism detail further pins down what the tool actually does.

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

Usage Guidelines4/5

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

Gives concrete operating context: SFTP is preferred with plaintext FTP fallback, SSH/FTP access is required, and dry-run tests connectivity only. It does not, however, name a sibling alternative or state when a caller should choose this over run_command or manage_script, leaving the routing decision partly to inference.

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

Deploy Server

Other Tools