Skip to main content
Glama

Upload Media (Popcraft)

popcraft_media_upload

Get upload URLs for a local image/video/audio file that has no public URL to hand to popcraft_media_import_url. THIS IS THE TOOL FOR VIDEO and for anything over 20 MB. Returns a proxy_upload_url on Popcraft's OWN host (PUT the bytes there — total file size up to the per-type cap: video 500 MB, image 30 MB, audio 50 MB; each individual REQUEST is capped at 28 MB by the transport, so files over 28 MB use the chunked recipe B — same URL, same total cap) and an upload_url for a direct PUT to storage.googleapis.com (fewer hops, but a different host that sandboxed clients often cannot reach). The result text contains ready-to-run shell recipes including the chunked one for large files — RUN one of them rather than reimplementing the upload. Running a shell command also keeps the file bytes out of your context, which is why this beats popcraft_media_upload_inline for video: that tool needs the whole file base64-encoded in its arguments, so it is only practical for small files. CAUTION on platform-mediated clients (e.g. claude.ai connectors): tool calls are made from the platform's servers, so this call succeeding does NOT prove your shell can reach Popcraft — run the 5-second egress probe in recipe 0 first. If your shell's egress is blocked: prefer asking the user for any shareable link to the file (Drive/Dropbox/etc) and popcraft_media_import_url (server-side fetch, immune to client egress blocks); if no link exists, open popcraft_media_upload_widget when the client renders widgets. After the upload, call popcraft_media_confirm with the returned media_id to verify it landed, then pass that media_id as a medias[].value for popcraft_generate_image / popcraft_generate_video / popcraft_generate_audio. If you have no shell and no network at all, fall back to popcraft_media_upload_inline — but never tell the user to upload the file on the website instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYesOriginal filename (used for content-type hinting and readability only — the stored path is unique regardless)
size_bytesNoSize of the file in bytes. Pass it so an over-limit file is rejected before you upload (caps: image 30MB, video 500MB, audio 50MB, 3D 150MB).
content_typeYesMIME type of the file, e.g. image/png, video/mp4, audio/mpeg. Accepted: jpeg/png/webp/gif images, mp4/webm/mov video, mp3/wav/ogg/aac/m4a audio, glb/fbx 3D — anything else is rejected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations (readOnlyHint=false, idempotentHint=false, openWorldHint=false) only mark this as a non-read, non-idempotent write; the description adds substantial context the annotations cannot: per-type size caps, a 28 MB transport request cap, the two distinct upload hosts, a caution that platform-mediated clients may not have reachable egress, and the required follow-up confirm step.

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 purpose and the video/20 MB trigger before any of the branching fallbacks. It is long and ALL-CAPS-heavy, but the length is driven by real branch complexity (two hosts, chunked recipe, egress probe, three fallbacks), so most sentences earn their place.

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?

Despite no output schema, it names the return values (proxy_upload_url, upload_url, media_id), explains how to use each, and closes the loop through popcraft_media_confirm and medias[].value for the generate tools. An agent has everything needed to call it and act on the result.

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 description coverage is 100%, so the baseline is 3, but the description adds a semantic not in the schema: the 28 MB per-request transport cap that forces chunked uploads above it, which directly affects how size_bytes should be interpreted. It otherwise largely restates the caps already documented per-parameter.

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+resource (get upload URLs for a local file that has no public URL) and explicitly names the siblings it is not (popcraft_media_import_url, popcraft_media_upload_inline, popcraft_media_upload_widget). An agent can pick it apart from its nearest neighbors without opening a 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 when-to-use conditions (local file with no public URL, video, files over 20 MB), when-not (import_url when a shareable link exists, inline only for small files, widget when client renders widgets), plus an egress-probe prerequisite and a fallback chain. Nothing 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.