Skip to main content
Glama

files_create_upload_url

Get a URL to upload a local file DIRECTLY to storage, without passing its bytes through this conversation.

Use this for any file you already have on disk — it is the only way to send one without spending tokens on its contents, and the only way to send anything above ~50 KB at all.

Three steps:

  1. files_create_upload_url(filename, mime_type, size_bytes, sha256)

  2. curl -X PUT --data-binary @/path/to/file (send every header from headers verbatim)

  3. files_complete_upload(file_id) -> the file is ready

Pass sha256 when you can: if the workspace already holds that exact file you get its file_id back immediately with deduplicated=true and no upload at all.

Returns: file_id, upload_url, method, headers, expires_at.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNoOptional display title
sha256NoHex sha256 of the file (`sha256sum <path>`). Optional but recommended: enables dedup and verifies the upload arrived intact.
filenameYesFilename with extension (e.g. 'photo.jpg')
mime_typeNoMIME type (e.g. 'image/jpeg'). Guessed from the filename when omitted.
size_bytesYesEXACT byte length of the file (`stat -c %s <path>`). Checked before anything is transferred, so an oversize file is refused here rather than after the upload. Limit: 100 MB.
in_workspaceNoRun this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / in_workspace
      Added value: +{
      +  "description": "Run this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.",
      +  "type": "integer"
      +}
  2. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only give a thin safety profile (readOnlyHint=false, destructiveHint=false). The description goes well beyond: it lays out the full three-step lifecycle, discloses the dedup short-circuit (file_id returned with deduplicated=true, no upload), the 100 MB pre-transfer rejection, URL expiry, and warns to send headers verbatim. This is exactly the behavioral context annotations cannot carry.

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?

Front-loads the core distinction before the mechanics, then uses a clean numbered three-step block, one sentence on dedup, and a one-line returns list. No filler or repetition; each section carries distinct 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?

With no output schema, the description compensates by enumerating the return fields (file_id, upload_url, method, headers, expires_at). Combined with the workflow and dedup behavior, an agent has everything needed to invoke and follow through correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the schema already documents sha256 (dedup + integrity), size_bytes (exact length, 100 MB limit, checked pre-transfer) and mime_type guessing. The description mostly reuses that framing and adds little parameter-level meaning beyond the schema; it mainly adds workflow ordering. Baseline 3 is appropriate.

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 ('Get a URL to upload a local file DIRECTLY to storage') and immediately contrasts it with the alternative path of sending bytes through the conversation. An agent can distinguish this from files_upload/files_ingest without opening any 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 scopes usage: 'any file you already have on disk', 'the only way to send one without spending tokens', 'the only way to send anything above ~50 KB at all'. It also gives the condition under which the optional sha256 is worth passing (immediate dedup). Nothing about when-to-use is left to inference.

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.