Skip to main content
Glama

Request a pre-signed upload URL

request_media_upload_url
Destructive

Generates a pre-signed upload URL so you can PUT image bytes directly and add new media to your shop.

Instructions

Rate limit: 20 requests / minute per shop. See Rate limiting.

Returns a pre-signed upload URL for uploading a new image. After receiving the response, PUT the image bytes directly to the uploadUrl.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNoSize of the file in bytes. Must match the `x-goog-content-length-range` header sent when uploading the bytes to `uploadUrl`.
accountNoExact private shop profile label; not a provider identity or authorization proof.
confirmNoExplicit approval for this exact provider effect or local private-file operation.
payloadNoComplete current native JSON body; cannot mix with native body flags or payload_file.
fileNameNoName of the file
contentTypeNoMIME type of the file
output_fileYesAbsolute NEW owner-private receipt file; exclusive0600 creation, no overwrite. Upload/public-token URLs never enter ordinary output.
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

A3.7/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=true, openWorldHint=true, idempotentHint=false), the description adds two useful behavioral facts: a concrete rate limit (20 requests/minute per shop) and the required post-response workflow of PUTting bytes to uploadUrl. It does not, however, explain the destructive or non-idempotent nature flagged by annotations.

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 short sentences with the rate limit stated up front and the workflow second; nothing is wasted. The leading rate-limit line is slightly less important than the tool's core purpose, but overall it is well front-loaded.

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?

With no output schema, the description correctly explains what comes back (an uploadUrl) and the next action to take. Combined with annotations covering the safety profile, an agent has enough to invoke and follow through, though it omits details like URL expiry or response shape.

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

Parameters3/5

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

Schema description coverage is 100% and there are 8 parameters (including a nested payload object), so the schema already documents size, fileName, contentType, etc. The description adds no parameter-level detail beyond what the schema provides, which is the baseline-3 case.

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?

The description states a specific verb and resource: returns a pre-signed upload URL for uploading a new image. It clearly distinguishes the tool's output from siblings like save_media_image or attach_product_images, though it doesn't explicitly name the alternative upload-URL tool (request_digital_file_upload_url).

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?

It describes the follow-up step (PUT the image bytes directly to the uploadUrl), which implies usage, but gives no guidance on when to choose this tool over request_digital_file_upload_url, save_media_image, or upload_file. Context is implied 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