Skip to main content
Glama

Create Upload

create_upload
Destructive

Prepare a private binary upload. Supply productId from list_products; POST image bytes separately to uploadUrl with the returned headers and credential. No storage is allocated until POST. Reuse an Idempotency-Key for identical bytes/options; GET /api/uploads/{key} recovers a lost response. No base64 or remote image URLs in MCP. Read returned image limits. SDK: /sdk/photo-upload.mjs. Guest checkout needs no sign-in: pass the private guestToken from start_guest_checkout, or use your existing OAuth connection, never both.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "create_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
cropNo
productIdNo
guestTokenNoPrivate guest credential; omit when Authorization Bearer is present.

Output Schema

NameRequiredDescriptionDefault
methodYes
artworkNo
headersYes
helpUrlYes
uploadUrlYes
maxFileBytesYes
authorizationYes
imageHandlingYes
maxInputPixelsYes
acceptedMimeTypesYes
responseSchemaUrlYes
acceptedExtensionsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / crop / properties / rotation
      Added value: +{
      +  "anyOf": [
      +    {
      +      "const": 0,
      +      "type": "number"
      +    },
      +    {
      +      "const": 90,
      +      "type": "number"
      +    },
      +    {
      +      "const": 180,
      +      "type": "number"
      +    },
      +    {
      +      "const": 270,
      +      "type": "number"
      +    }
      +  ],
      +  "description": "Clockwise image rotation after EXIF orientation, before cropping. Inspect the image and correct clearly sideways or upside-down content automatically; preserve intentional orientation. Choose portrait/landscape separately to match the corrected image."
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / guestToken
      Added value: +{
      +  "description": "Private guest credential; omit when Authorization Bearer is present.",
      +  "pattern": "^ppg_[a-f0-9]{64}$",
      +  "type": "string"
      +}
  3. Added

TDQS

A4.1/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: no storage is allocated until the bytes POST, an Idempotency-Key can be reused for identical bytes/options, GET /api/uploads/{key} recovers a lost response, and image limits are in the returned payload. It also discloses the auth requirement (guest token XOR OAuth) that annotations cannot express. This is exactly the mutation/auth/recovery context the destructiveHint=true annotation leaves out.

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?

Front-loaded with the core two-phase action, then prerequisites, recovery, and auth, each in its own compact sentence with no filler. The final auth sentence is dense and packs three constraints into one line, but every clause carries necessary information.

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 two-phase upload tool with a nested crop param and an output schema, the description covers what an agent needs to call it correctly: where productId comes from, which credential to use, the deferred byte POST, idempotent recovery, and a pointer to returned image limits. Return-value details can be left to the output schema.

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?

With only 33% schema description coverage, the description compensates well for productId (source: list_products) and guestToken (private credential from start_guest_checkout, omit when Bearer is present). However, the nested crop object, which carries most of the semantic weight (x/y, fit, orientation, rotation), is not addressed at all in the description, leaving that half of the parameter space to a sparse schema.

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 ('Prepare a private binary upload') and immediately clarifies the two-phase model: this call reserves an upload, and the bytes go to uploadUrl in a separate POST. It doesn't explicitly differentiate itself from the sibling import_photo, which is the tool an agent could plausibly confuse it with, so it stops short of a 5.

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?

Gives concrete routing guidance: take productId from list_products, use guestToken from start_guest_checkout for guest checkout or the existing OAuth connection, and never both. It also excludes wrong inputs ('No base64 or remote image URLs in MCP'). It lacks an explicit 'use this instead of import_photo when...' statement, so it is clear context without full alternative routing.

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