Skip to main content
Glama

EQVPS — VPS and code sandboxes for AI agents

Upload a file into a sandbox

upload_file
DestructiveIdempotent

Write a file into the sandbox at an absolute path (parent directories are created). Give content for UTF-8 text OR content_base64 for binary. Limit 5 MB per file inline — for bigger files call get_upload_url and PUT the bytes to the link (no base64 through this chat). Optional mode like "755". Requires: token + live sandbox_id. Max 5 MB.

Input Schema

NameRequiredDescriptionDefault
modeNoOptional. File permissions in octal, 3–4 digits, e.g. "644" or "755". Default: the sandbox default.
pathYesRequired. Absolute path inside the sandbox to write; parent directories are created, e.g. "/root/app/main.py". Must start with "/".
contentNoOptional. File content as UTF-8 text. Give either `content` or `content_base64` (default: empty file).
sandbox_idYesRequired. Sandbox id as returned by create_sandbox / list_sandboxes, e.g. "sb_3f2a…".
content_base64NoOptional. File content as base64 for binary files, up to 5 MB decoded. Use instead of `content`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / content / description
      Added value: +"Optional. File content as UTF-8 text. Give either `content` or `content_base64` (default: empty file)."
    • addedInput schema / properties / content_base64 / description
      Added value: +"Optional. File content as base64 for binary files, up to 5 MB decoded. Use instead of `content`."
    • addedInput schema / properties / mode / description
      Added value: +"Optional. File permissions in octal, 3–4 digits, e.g. \"644\" or \"755\". Default: the sandbox default."
    • addedInput schema / properties / path / description
      Added value: +"Required. Absolute path inside the sandbox to write; parent directories are created, e.g. \"/root/app/main.py\". Must start with \"/\"."
    • changedInput schema / properties / sandbox_id / description
      Previous value: -"Sandbox id as returned by create_sandbox / list_sandboxes, e.g. \"sb_3f2a…\"."New value: +"Required. Sandbox id as returned by create_sandbox / list_sandboxes, e.g. \"sb_3f2a…\"."
  2. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations flag destructiveHint=true and idempotentHint=true, and the description adds meaningful context: parent directories are auto-created, an inline size ceiling, and a required auth/sandbox-liveness precondition. It stops short of warning that an existing file at `path` is overwritten, which is exactly what the destructive hint implies and matters for a write tool.

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?

Dense and front-loaded: purpose, then content choice, then size limit, then permissions, then prerequisites. Slightly redundant — 'Limit 5 MB per file inline' is restated as 'Max 5 MB' at the end, and sandbox_id is re-listed as a requirement despite being a required schema field.

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?

With no output schema the description should cover behavior, limits and prerequisites, and it does. The remaining gap is overwrite/return semantics: it never says whether an existing file is replaced or what identifier/result comes back from the write.

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 100%, so the baseline is 3; the description nonetheless adds the inline 5 MB cap (not stated in the schema for `content`), reinforces the content/content_base64 mutual exclusivity, and gives a concrete `mode` example. It does not add path syntax beyond what the schema already documents.

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 ('Write a file into the sandbox at an absolute path') and immediately scopes it with parent-directory creation and the writable targets. It also distinguishes itself from the sibling get_upload_url, so an agent can separate it from download_file/run_code without opening a schema.

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?

Explicitly routes between inline vs out-of-band upload: 'Limit 5 MB per file inline — for bigger files call get_upload_url and PUT the bytes to the link (no base64 through this chat).' It also states the content vs content_base64 selection rule and the prerequisites ('token + live sandbox_id').

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.