Skip to main content
Glama

Prepare image upload

prepare_image_upload

Create a short-lived direct upload. PUT exactly byte_size bytes using the returned URL and headers, then call complete_image_upload.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYesClient filename, not a local path the server can read.
byte_sizeYesExact number of bytes the client will PUT.
mime_typeYesActual image MIME type.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodNoHTTP method the client must use for the byte transfer.PUT
headersYesExact transfer headers; do not add MCP tokens or API Bearer credentials.
max_bytesYesMaximum accepted upload byte count.
upload_idYesUpload session ID for complete_image_upload, not the final file_id.
expires_atYesUpload URL expiry.
upload_urlYesSensitive short-lived upload URL. Transfer actual bytes; do not publish this URL.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Adds context beyond annotations: the upload is 'short-lived', the PUT must be exactly byte_size bytes, and a follow-up call is required. Annotations cover open-world and non-idempotent behavior, so the description supplements without contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, front-loaded sentence that states the purpose and the required subsequent actions with zero waste. Every clause earns its 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?

The output schema handles return values, and the description covers the complete workflow (prepare, PUT, complete). No essential information for calling this tool correctly is missing, including the requirement to use the returned URL and headers.

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 coverage is 100%, with each parameter already described. The description reinforces the 'exactly byte_size' requirement, which is also in the schema, but adds little new semantic information beyond the existing parameter documentation.

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 ('Create'), a resource ('short-lived direct upload'), and the exact follow-up actions (PUT bytes, then call complete_image_upload). This clearly distinguishes it from sibling tools like complete_image_upload and generate_animation.

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

Usage Guidelines4/5

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

Provides an explicit usage sequence: prepare, PUT exactly byte_size bytes, then complete. It does not list alternatives or exclusions, but the two-step flow is unambiguous for the direct-upload use case.

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