Skip to main content
Glama

Create a presigned upload

create_upload

Upload a LOCAL PNG or JPEG (up to 10 MB) through a one-time presigned PUT; use it when this server is remote and you have a shell.

Instructions

Upload a LOCAL PNG or JPEG (up to 10 MB) through a one-time presigned PUT; use it when this server is remote and you have a shell. Pass media_type, the exact size in bytes and the file's sha256 (sha256sum <file> or shasum -a 256 <file>). Within 15 minutes run: curl -X PUT -H 'content-type: <media_type>' --data-binary @<file> '<put_url>' (curl sends the content-length itself; both headers must match what you declared). Once the PUT finished, the upload_id works as {upload_id, rights_confirmed: true} in quote_image, generate_image, quote_video and generate_video; before that they answer upload_not_finished. Call get_upload to confirm and to read content_digest, width and height; other tools that take an upload_id need that call first. Use the upload_id within 24 hours. Free; counts toward 20 uploads per day.

Input Schema

NameRequiredDescriptionDefault
bytesYesExact file size in bytes
sha256YesLowercase hex SHA-256 of the file
filenameNo
media_typeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.33.0

TDQS

A4.5/5.0
Behavior5/5

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

Goes far beyond the readOnlyHint=false/destructiveHint=false annotations: one-time presigned PUT, a 15-minute window to complete the PUT, 24-hour upload_id validity, header/content-length must match what was declared, and a free tier capped at 20 uploads per day. It also discloses the pre-PUT failure mode ('before that they answer upload_not_finished').

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?

Front-loaded with the core action and its prerequisites; every sentence is operational rather than filler. The single dense paragraph packs many distinct obligations together, which is efficient but slightly harder to scan than a short structured list would be.

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?

No output schema exists, and the description conveys the useful return values contextually (put_url used in the curl command, upload_id used downstream) and directs the agent to get_upload for content_digest/width/height. It never explicitly states the create_upload response shape, which is the remaining gap.

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?

With 50% schema coverage, the description compensates by explaining how to produce sha256 (`sha256sum <file>` / `shasum -a 256 <file>`) and that the content-type header must match the declared media_type. It says nothing about the optional `filename` parameter, leaving that field undocumented in both places.

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 ('Upload a LOCAL PNG or JPEG ... through a one-time presigned PUT') with hard constraints (10 MB, PNG/JPEG). It also distinguishes the sibling path by scoping itself to 'when this server is remote and you have a shell', which separates it from the direct upload_image route.

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?

Gives a clear selecting condition ('when this server is remote and you have a shell') and downstream sequencing ('Call get_upload to confirm ... other tools that take an upload_id need that call first'). The when-not side and the alternative tool name (upload_image) are only implied by contrast, not stated outright.

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