Skip to main content
Glama

Upload service file

upload_service_file
Destructive

Upload a local or Base64 file to a VPSnet server using resumable, SHA-256-verified chunks and an atomic commit; optionally overwrite an existing file and return the final operation result.

Instructions

Upload a file to the server in one call: from localPath (a file on the machine running this MCP server) or contentBase64. The tool computes the SHA-256, starts a resumable upload, sends every chunk (Cloud VPS: the API chunk route, at most 64 MiB; Firecracker: the node's data plane without the API key, at most 2 GiB), commits it atomically and checks the SHA-256 the server computed. A new file is created 0644 unless mode is given; overwrite=true replaces an existing file and needs its expectedVersion (stat_service_file). At most 3 open uploads per service; a failed transfer is aborted so its slot is freed. A slow guest answers 202 with an operation: this tool polls it itself and returns the final answer, or, after waitSeconds, the operationId to continue with get_service_file_operation (never repeat the call). Requires files:manage on a FULL-access API key as an explicit grant; the hosted connector needs vm:files:write. Execution-equivalent targets (authorized_keys, cron, systemd units, sudoers, PAM, profile files) are refused to every API key (filesExecEquivalentScopeMissing). Availability: Firecracker servers need the updated guest agent (filesUnavailable reason agent_update_required; node_update_required while the host node is not updated yet) and Cloud VPS (KVM) servers need the VDS file-manager switch (reason feature_disabled while it is off); relay any unavailable reason verbatim and never work around it. A server whose 2FA lock is on answers 423.

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": {
      "orderNo": "<orderNo>",
      "path": "<path>"
    },
    "name": "upload_service_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoOctal permission bits for a NEW file, e.g. 0644
pathYesAbsolute path inside the server (UTF-8, at most 4096 bytes, no . or .. components)
orderNoYesTenant-owned service order number, e.g. VP12345
localPathNoAbsolute path on the machine running this MCP server
overwriteNo
waitSecondsNoHow long this tool waits for a slow guest's operation before returning its operationId (default 30, recursive delete and extract 60)
contentBase64No
expectedVersionNo
confirmSystemPathNoSet true only after the user explicitly approved changing this operating-system path (otherwise 409 filesSystemPathConfirmRequired)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.3.17

TDQS

A4.4/5.0
Behavior5/5

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

Goes far beyond the annotations (destructive/non-idempotent/not-read-only) by disclosing SHA-256 computation and server-side verification, atomic commit, chunk ceilings per platform (64 MiB vs 2 GiB), default 0644 mode, a 3-open-upload concurrency cap, abort-on-failure slot release, 202 polling behavior, required scopes (files:manage / vm:files:write), refusal of execution-equivalent targets, availability preconditions, and the 423 response under a 2FA lock.

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 core action is front-loaded, but everything else is compressed into one dense paragraph of stacked parentheticals (chunk limits, error codes, availability reasons), which makes it harder to scan than a short bulleted or segmented layout would be. Little is redundant, though several failure codes could be trimmed.

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 9-parameter destructive mutation with no output schema, the description covers prerequisites, error modes, polling, and concurrency. The gap is the return payload: "returns the final answer" is vague about what a successful upload returns (path, version, size), which matters since overwrite flows depend on obtaining a version.

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?

Schema coverage is 67%, and the description adds real meaning for the weaker parameters: it distinguishes localPath from contentBase64 as alternative sources, ties overwrite to expectedVersion and stat_service_file, and clarifies that mode applies only to a NEW file. confirmSystemPath and the expectedVersion value format are left to the schema alone.

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 ("Upload a file to the server in one call") and immediately names the two mutually exclusive sources, localPath or contentBase64, so the agent knows exactly what operation is performed and how input is supplied.

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 routing rules: overwrite=true requires expectedVersion obtained from stat_service_file, a 202 response should be continued via get_service_file_operation rather than a repeat call, and unavailable reasons must be relayed verbatim. It never states the general case where a sibling such as write_service_file or download_service_file would be preferred, so the when-not-to-use side is only partially covered.

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