Skip to main content
Glama

Save an uploaded image to the media library

save_media_image
Destructive

Persists an uploaded image in the media library after the client uploads it to a signed URL, finalizing media storage for shop use.

Instructions

Rate limit: 100 requests / 10 seconds per shop. See Rate limiting.

Persists an uploaded image in the media library after the client has PUT it to the signed URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthNo
heightNo
accountNoExact private shop profile label; not a provider identity or authorization proof.
confirmNoExplicit approval for this exact provider effect or local private-file operation.
fileUrlNo
payloadNoComplete current native JSON body; cannot mix with native body flags or payload_file.
payload_fileNoAbsolute regular non-symlink native JSON body file, at most1MiB. Cannot mix with payload or body flags.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.1/5.0
Behavior3/5

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

Adds genuinely useful context the annotations do not carry: the 100 requests / 10 seconds per shop rate limit with a docs link. However, with destructiveHint=true and idempotentHint=false, the description never explains what the operation destroys, whether repeats create duplicates, or why the 'confirm' flag exists – gaps that matter for a mutation.

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?

Two tight sentences with no filler. The ordering places the rate-limit note ahead of the actual purpose, which is slightly backwards for front-loading, but the total length is well controlled.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, non-idempotent mutation with a nested payload object, no output schema, and no required-parameter signaling, the description omits too much: what gets destroyed, return behavior, and how the account/confirm semantics affect the call. The rate-limit note is the only extra context supplied.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 57% and the description explains none of the 7 parameters. It notes an image was uploaded but does not map fileUrl, width, height, account, confirm, or the payload/payload_file body alternatives, leaving the agent without guidance on a schema where no parameters are even marked required.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Persists an uploaded image in the media library', and adds the workflow precondition (client already PUT to the signed URL). This differentiates it from siblings like request_media_upload_url and list_media_images, though it never names them explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'after the client has PUT it to the signed URL' implies when to call it (second step of the upload flow), but no alternative is named and no explicit when-not condition is given. Usage is inferable rather than stated.

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

Deploy Server

Other Tools