Upload service file
upload_service_fileUpload 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
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Octal permission bits for a NEW file, e.g. 0644 | |
| path | Yes | Absolute path inside the server (UTF-8, at most 4096 bytes, no . or .. components) | |
| orderNo | Yes | Tenant-owned service order number, e.g. VP12345 | |
| localPath | No | Absolute path on the machine running this MCP server | |
| overwrite | No | ||
| waitSeconds | No | How long this tool waits for a slow guest's operation before returning its operationId (default 30, recursive delete and extract 60) | |
| contentBase64 | No | ||
| expectedVersion | No | ||
| confirmSystemPath | No | Set true only after the user explicitly approved changing this operating-system path (otherwise 409 filesSystemPathConfirmRequired) |