Skip to main content
Glama

Prepare an automatic image upload

request_upload

Prepare a signed URL for automatically uploading a readable attachment. Free; no card.

If the host supplies image_files, pass them directly to estimate_study/run_study instead.
Otherwise, when you can read the attached file (e.g. Codex or Claude Code), run curl_command
with <PATH_TO_IMAGE> replaced by its actual path. Do not ask the user to select it again.
This call only creates a link: received=false means the image has NOT arrived. Only report
success after the upload returns ok=true with this ref and received=true; if the response
is lost, GET status_url and check received before retrying. Then pass ref as image_refs.
A ref with no image is refused without charging.

Read if_upload_fails for recovery. If automatic transfer is unavailable or failed, use
request_manual_upload for a card, or offer manual_upload_url to keep the same ref. Never
claim a network failure is specific to a client you have not identified.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelNoWhat the image is, in a few words, e.g. 'Spring sale banner, version B'

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okNofalse means the call failed: read `error` and `hint`
refNoPass as image_refs once the image has arrived
hintNoWhat to change, when ok is false
nextNoWhat to do next
noteNoSomething to tell the user or keep in mind
errorNoError code, when ok is false
receivedNofalse until the image has arrived
max_bytesNo
status_urlNoGET to check `received`
upload_urlNo
curl_commandNoRun with <PATH_TO_IMAGE> replaced
upload_stateNo
accepted_typesNo
if_upload_failsNoRead before sending anything
manual_upload_urlNoFor a person to upload in a browser
expires_in_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare the generic non-readOnly/non-destructive profile, while the description adds the operationally critical traits: the call only creates a link, received=false means no arrival, success requires ok=true plus received=true, status_url can be polled if the response is lost, and an image-less ref is refused without charge. This is far more than the annotations convey.

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?

The critical constraint (link-only, no image yet) is front-loaded and most sentences carry operational load. A few lines, such as the closing instruction about not blaming a specific client, are process guidance rather than tool semantics and slightly dilute the paragraph.

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?

With an output schema present, return values need not be restated, yet the description still covers the success condition, the lost-response recovery path, the no-charge refusal case, and the fallback tools. An agent has everything needed to call this correctly and report accurately.

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?

Only one optional parameter, and the schema already documents it at 100% coverage with a concrete example. The description adds nothing about the label field, so the baseline 3 is appropriate — the schema carries this dimension.

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 — prepares a signed URL for automatic image upload — and immediately scopes it against the sibling path (estimate_study/run_study when host supplies image_files). An agent can tell this apart from request_manual_upload and upload_asset 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 routing: use this when the file is readable and no host image_files exist; use estimate_study/run_study when the host supplies them; fall back to request_manual_upload or manual_upload_url on failure. Alternatives and their selecting conditions are named outright.

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