Skip to main content
Glama

Upload service file

upload_service_file
Destructive

Upload a file to a VPSnet server from a local path or base64 content, using resumable chunked transfer, SHA-256 verification, and atomic commit.

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.

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.3/5.0
Behavior4/5

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

Annotations already declare destructive/non-idempotent/write semantics, but the description adds substantial context beyond them: SHA-256 computed and verified after atomic commit, a 3-open-upload cap with aborts freeing slots, exec-equivalent path refusals (filesExecEquivalentScopeMissing), required scopes (files:manage on FULL access, vm:files:write), 423 on 2FA lock, and availability gates with verbatim reason codes. It earns credit for going well past the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and then densely packed with genuinely load-bearing constraints, so little is wasted. The middle sentences are long clause chains that could have been split or bulleted without losing information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, and the description compensates by stating what comes back (the final answer, or an operationId after waitSeconds). Combined with the permission, availability, and safety constraints, an agent has everything needed to invoke this correctly on the first try.

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 supplies the meaning the schema leaves implicit: when expectedVersion applies, what waitSeconds returns on expiry, that mode applies only to a NEW file, and that overwrite replaces rather than creates. It does not explain confirmSystemPath's 409 behavior (already in schema) or how mode interacts with overwrite, so it is strong but not exhaustive.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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') and names the two input sources (localPath or contentBase64), plus the resumable/chunked/atomic pipeline, so the agent can tell it is the full upload path rather than a plain write. It never names its closest sibling (write_service_file), so the differentiation from that alternative is left to inference.

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

Usage Guidelines5/5

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

Explicit routing rules: use overwrite=true with expectedVersion from stat_service_file when replacing; after waitSeconds expires continue with get_service_file_operation and 'never repeat the call'; relay unavailability reasons verbatim and 'never work around it'. These are concrete when-to-use and when-not-to-do-something instructions.

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