Skip to main content
Glama

Create Upload Tool

create_upload

Put the user's own photos or images (product shots, headshots, screenshots) into renders. You can see images attached in chat but can't pass their bytes to a tool, so this returns one Upload per file name, each with its permanent url to use in right away, plus two ways to send the files. 1) If you can run code and have the files, send each from your sandbox: curl -T sofa.jpg "". 2) If that fails (no sandbox, no network access to this server), give the user the one upload_page_url, where they drop all the photos at once, and wait for them to say it is done. Name each file in filenames as the user knows it (sofa.jpg, lamp.png): the page matches dropped files by name, then fills the rest in order. Up to 10 per call; each link takes one file and expires in an hour. JPEG, PNG or WebP up to 15 MB each; files are re-encoded without metadata and scaled to at most 4000 px. A render that uses an Upload still waiting for its file fails with a reminder, without counting.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "create_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenamesNoOne name per photo, for example ["sofa.jpg", "lamp.png"], up to 10. Shown to the user on the upload page and in list_uploads. Omit for a single unnamed Upload.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.4/5.0
Behavior3/5

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

Annotations carry only a title, so the description must do the behavioral work, and it does: 10 files per call, one-hour link expiry, JPEG/PNG/WebP at 15 MB each, re-encoding without metadata, downscaling to 4000 px, and the pending-Upload failure mode. What it omits is whether uploads persist indefinitely, how to learn when files have actually arrived, and whether there is any auth requirement — gaps that matter for a tool whose whole lifecycle is asynchronous.

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?

Purpose and return value are front-loaded, and the two upload paths are numbered with a concrete curl example that earns its space. The prose is dense and runs as a single block, so the fallback rules and the file-limit/re-encode constraints blur together, but nothing is genuinely redundant.

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?

No output schema exists, yet the description fully specifies what comes back — per-file Upload records with a permanent url, a put_url, and a shared upload_page_url. Combined with limits, expiry, formats, and the failure behavior, an agent has everything needed to call this correctly and hand off to render.

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% and there is only one optional parameter, so the schema already defines filenames. The description still adds real semantics beyond it: names should be what the user calls the files, the upload page matches dropped files by name and fills remaining slots in order, and omitting the parameter yields a single unnamed Upload — all behavior an agent could not infer from the schema alone.

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 — putting the user's own photos into renders — and immediately clarifies the return shape (one Upload per file name with a permanent url) and the capability gap it bridges (chat attachments have no bytes a tool can pass). It is distinguishable from siblings like render and list_uploads 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?

Gives explicit routing: use the sandbox curl -T path when code execution and the files are available, and fall back to the shared upload_page_url when there is no sandbox or network access, then wait for the user to confirm. It also states a consequence rule — a render referencing a still-pending Upload fails with a reminder and is not counted — which tells the agent how to sequence this call before render.

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