Skip to main content
Glama

Upload Media (Popcraft, interactive)

popcraft_media_upload_widget

Open an interactive file-picker widget for the user to upload an image/video/audio file directly into Popcraft — use this instead of popcraft_media_upload when the client can render MCP Apps widgets and the user should pick/drag a file themselves, or when your shell's egress is blocked (sandboxed client) so the upload recipes cannot run. BEFORE opening it, check the one zero-click alternative: if the file exists anywhere online (Google Drive, Dropbox, any share link), ask the user for the link and use popcraft_media_import_url instead — Popcraft fetches it server-side, so client egress does not matter and the user never has to click anything. The widget uploads from the user's BROWSER, so it works even when both your shell and the user's machine cannot PUT to Popcraft directly. It drives the upload end-to-end (signed URL, PUT, confirm) and, once confirmed, hands the resulting media_id back as the next user message so you can use it as a medias[].value for popcraft_generate_image / popcraft_generate_video / popcraft_generate_audio. Pass type and a specific label naming the exact file you expect.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoRestrict the file picker to a media type; omit or "auto" allows image/video/audio
labelNoOptional label shown above the file picker, e.g. "Upload your product photo"
multipleNoAllow selecting multiple files (default false)
max_filesNoMaximum files accepted (default 10 when multiple, else 1)
min_filesNoMinimum confirmed uploads before the widget hands the media_ids back (default 1)

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 declare only the safety profile (not read-only, not destructive, not idempotent); the description goes well beyond by explaining that uploads run from the user's browser, work even when shell egress is blocked, and that the tool drives signed URL/PUT/confirm end-to-end. It also discloses the unusual return path: the `media_id` comes back as the next user message.

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 is front-loaded in the first clause and the routing guidance follows logically. It is on the long side with several clauses packed together, but each sentence carries distinct information (routing, alternative, behavioral notes, parameter advice).

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 widget-based upload tool with no output schema, the description covers everything an agent needs: when to use it, the zero-click alternative, egress/rendering constraints, and how the resulting media_id is delivered and consumed downstream.

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. The description adds usage guidance beyond the schema: restrict via `type` and pass a specific `label` naming the exact file expected, which clarifies intent rather than just repeating the field docs.

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 ('open an interactive file-picker widget for the user to upload an image/video/audio file') and explicitly distinguishes itself from sibling `popcraft_media_upload` and `popcraft_media_import_url`. An agent can route correctly 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 selection conditions: use this instead of `popcraft_media_upload` when the client renders MCP Apps widgets or when the shell's egress is blocked. It also names the zero-click alternative (`popcraft_media_import_url`) and the condition that selects it (file exists online), plus a pre-open check.

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