Skip to main content
Glama

Get an upload URL for a sandbox file

create_upload_url

Generate a short-lived URL to upload a file directly into a sandbox by PUTting the raw request body; missing directories are created and the URL expires after a set TTL.

Instructions

Get an upload URL for a sandbox file. Returns a short-lived URL that the sandbox serves itself. PUT the file as the raw request body to write it, with no size limit and no Authorization header. Missing directories are created; an existing file is replaced only once the upload completes. The URL is bound to this path and expires after ttlSeconds (default 15 minutes, at most 1 hour). Needs file.write. Treat the URL as a secret until it expires.

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": {
      "sandboxId": "<sandboxId>",
      "path": "<path>"
    },
    "name": "create_upload_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path, or path relative to the sandbox work directory (/home/user). It must resolve under /home/user or /tmp.
sandboxIdYesPublic Sandbox id returned by create/list/get sandbox calls.
ttlSecondsNoHow long the URL stays valid.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations, it discloses the URL's short lifetime and sandbox hosting, path binding, lack of upload authorization, automatic directory creation, replacement only after upload completion, the file.write permission requirement, and secret-handling guidance. These details provide unusually strong operational and security transparency.

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?

The purpose and returned resource are front-loaded, followed by distinct details about invocation, side effects, expiration, permissions, and security. The description is dense but efficient, with no filler or redundant explanation beyond the brief restatement of TTL limits.

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?

Although there is no output schema, the description explains the nature of the returned URL and exactly how to consume it, including HTTP method, body, authentication, expiry, permissions, and filesystem effects. Together with the fully documented input schema, this is sufficient for correct selection and invocation; only explicit alternative-tool routing is absent.

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?

The schema already fully describes all three parameters, and the description partly repeats the ttlSeconds default and maximum. It adds useful meaning by explaining that the URL is bound to the supplied path and how uploads affect that path, including directory creation and completed-upload replacement.

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?

The description precisely states the operation and resource: obtaining a short-lived upload URL for a sandbox file. Explaining that the caller subsequently writes the file with a raw PUT also clarifies the indirect upload model, distinguishing it in substance from direct file writes and download URLs.

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?

It provides actionable usage context: PUT the file as the raw request body, without an Authorization header and without a size limit, making the intended upload flow clear. It does not explicitly say when to prefer this over write_file or contrast it with create_download_url, so sibling-selection guidance remains incomplete.

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