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.

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. Changed28 schema fields changed
    • addedOutput schema / properties / artwork / properties / bleed / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / artwork / properties / calendar / properties / months / anyOf
      Added value: +[
      +  {
      +    "const": 12,
      +    "type": "number"
      +  },
      +  {
      +    "const": 18,
      +    "type": "number"
      +  }
      +]
    • removedOutput schema / properties / artwork / properties / calendar / properties / months / enum
      Removed value: -[
      -  12,
      -  18
      -]
    • removedOutput schema / properties / artwork / properties / calendar / properties / months / type
      Removed value: -"number"
    • addedOutput schema / properties / artwork / properties / composition / properties / height / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / artwork / properties / composition / properties / height / minimum
      Added value: +-9007199254740991
    • addedOutput schema / properties / artwork / properties / composition / properties / slots / items / properties / height / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / artwork / properties / composition / properties / slots / items / properties / height / minimum
      Added value: +-9007199254740991
    • addedOutput schema / properties / artwork / properties / composition / properties / slots / items / properties / width / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / artwork / properties / composition / properties / slots / items / properties / width / minimum
      Added value: +-9007199254740991
    • addedOutput schema / properties / artwork / properties / composition / properties / slots / items / properties / x / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / artwork / properties / composition / properties / slots / items / properties / x / minimum
      Added value: +-9007199254740991
    • addedOutput schema / properties / artwork / properties / composition / properties / slots / items / properties / y / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / artwork / properties / composition / properties / slots / items / properties / y / minimum
      Added value: +-9007199254740991
    • addedOutput schema / properties / artwork / properties / composition / properties / width / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / artwork / properties / composition / properties / width / minimum
      Added value: +-9007199254740991
    • addedOutput schema / properties / artwork / properties / heightPixels / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / artwork / properties / heightPixels / minimum
      Added value: +-9007199254740991
    • addedOutput schema / properties / artwork / properties / maxImages / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / artwork / properties / maxImages / minimum
      Added value: +-9007199254740991
    • addedOutput schema / properties / artwork / properties / minImages / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / artwork / properties / minImages / minimum
      Added value: +-9007199254740991
    • addedOutput schema / properties / artwork / properties / widthPixels / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / artwork / properties / widthPixels / minimum
      Added value: +-9007199254740991
    • addedOutput schema / properties / maxFileBytes / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / maxFileBytes / minimum
      Added value: +-9007199254740991
    • addedOutput schema / properties / maxInputPixels / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / maxInputPixels / minimum
      Added value: +-9007199254740991
  3. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that no storage is allocated until the separate POST (important given destructiveHint=true), that credentials/headers come back from this call, and how idempotency keys make retries safe. The idempotentHint=false annotation is not contradicted — each call still mints a new upload; the key only dedupes identical bytes/options.

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?

Dense but front-loaded: the core action leads, then the POST step, idempotency, and constraints follow in decreasing priority. The trailing SDK path reference is compact and useful rather than filler, though the run of short imperative clauses reads as slightly telegraphic.

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?

For a two-step upload with nested crop options and credential variants, the definition covers the flow, credentials, idempotency, and even points at returned image limits. Since an output schema exists, return-value detail is correctly omitted; only crop-parameter intent is left thin.

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 only 33%, so the description must carry more weight. It does add value for productId (source it from list_products) and guestToken (omit when a Bearer token is present), but the nested crop object — x/y/fit/orientation — gets no explanation beyond the schema, leaving the richest part of the input under-described in prose.

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?

"Prepare a private binary upload" states a specific verb and resource, and the following sentences make the two-phase nature (metadata now, bytes later via uploadUrl) unambiguous. It also implicitly differentiates itself from image-by-URL/base64 paths with "No base64 or remote image URLs in MCP," though it never names an alternative sibling directly.

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?

Explicitly routes productId acquisition to list_products and prescribes the POST step and Idempotency-Key reuse policy, with GET /api/uploads/{key} given as the recovery path for a lost response. It lacks an explicit statement of when a caller should use this versus a different import path, but the usage context is otherwise clear.

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