Skip to main content
Glama

Upload file data

upload_data

Remote-safe upload for sandboxed MCP clients (Claude.ai, ChatGPT) whose egress allowlist blocks PUTs to the storage host: send the file bytes as base64 and they upload through the API itself — the same host the MCP session already uses. Returns a ready file_id for file_ids. Decode locally first: if a source image fails to decode or renders blank/transparent, the bytes are corrupt — tell the user instead of uploading. For logos/photos prefer this over asset_files on create_design/update_design when a presigned PUT is not possible. Not for files over ~20MB.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYesOriginal filename, e.g. logo.png — extension sets the content type
data_base64YesBase64 of the ORIGINAL file bytes. Read the file and encode it in one step; never retype, trim, or 'fix' a base64 string by hand — a mangled encoding decodes but produces a blank/transparent image.
content_typeNoOptional MIME type; derived from the filename extension when omitted

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
uriNo
statusYes
file_idYes
filenameNo
next_stepNo
created_atNo
size_bytesNo
content_typeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only mark the operation as non-read-onlyasi, but the description adds meaningful behavioral detail: uploads go through the existing MCP session host, there is a ~20MB size ceiling, and corrupt bytes should not be uploaded. It also discloses the successful result shape by mentioning the returned file_id.

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?

The description is front-loaded with its core purpose and every sentence serves a purpose, including alternatives, constraints, and validation guidance. It is somewhat dense and repeats part of the schema's decoding warning, and the phrase 'for file_ids' is underexplained, which keeps it from being perfectly concise.

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?

For a tool with this complexity, the description covers the key decision context, constraints, corruption handling, alternatives, and expected output. The presence of an output schema means return-value details do not need to be restated, and nothing essential for correct invocation is missing.

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 already 100%, so the baseline is a 3. The description adds some value by emphasizing local decode checks and the size limit, but much of the base64-integrity warning is already present in the data_base64 parameter description, so the extra semantic lift is moderate.

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 clearly identifies upload_data as a base64, API-host upload that returns a file_id, and differentiates it from the presigned-PUT path and asset_files usage on create_design/update_design. The 'remote-safe' qualifier and base64 mechanism make its role specific and distinguishable from related upload tools.

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?

It states exactly when to use the tool—sandboxed clients whose egress blocks PUTs—and when not to: files over ~20MB or cases where a presigned PUT is possible. It also gives a concrete pre-upload validation workflow, telling the agent to decode locally and report corruption instead of uploading.

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.

Resources