Skip to main content
Glama

request_image_upload

Request a short-lived upload grant for ONE image file — step 1 of attaching a photo (any vertical/role). Use it when the user wants a photo on a new listing (then create_listing) or added to an existing one (then update_listing_images) — call it once per image, maximum 6 images per listing. Do not use it when you only have an image URL: it needs the raw file bytes (JPEG, PNG or WebP, up to 10 MB), and it attaches nothing by itself. Returns { key, upload_url, upload_token, headers_required }: PUT the raw image bytes to upload_url with exactly those headers, then pass the returned key in create_listing's images array or update_listing_images' add array. A key whose bytes were never uploaded fails later with image_not_uploaded. Images are AI-moderated for content safety before the listing goes live. Requires the user to be connected to Teppek (authenticated).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "content_type": "<content_type>",
      "file_size": "<file_size>"
    },
    "name": "request_image_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_sizeYesExact file size in bytes, at most 10485760 (10 MB). Example: 2097152 for a 2 MB file.
content_typeYesMIME type of the image file. Example: "image/png".

Output Schema

NameRequiredDescriptionDefault
keyNo
upload_urlNo
upload_tokenNo
headers_requiredNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changed
    • changedInput schema / properties / content_type / enum
      Previous value: -[
      -  "image/jpeg",
      -  "image/png",
      -  "image/webp",
      -  "image/avif"
      -]New value: +[
      +  "image/jpeg",
      +  "image/png",
      +  "image/webp"
      +]
  3. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  4. Changed2 schema fields changed
    • addedInput schema / properties / content_type / description
      Added value: +"MIME type of the image file. Example: \"image/png\"."
    • addedInput schema / properties / file_size / description
      Added value: +"Exact file size in bytes, at most 10485760 (10 MB). Example: 2097152 for a 2 MB file."
  5. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "headers_required": {
      +      "additionalProperties": {},
      +      "properties": {},
      +      "type": "object"
      +    },
      +    "key": {
      +      "type": "string"
      +    },
      +    "upload_token": {
      +      "type": "string"
      +    },
      +    "upload_url": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  6. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only say non-read-only, non-destructive, non-idempotent; the description goes much further by disclosing the auth prerequisite, the short-lived grant, AI moderation, and the concrete failure mode (image_not_uploaded) when bytes are never PUT. It also warns 'it attaches nothing by itself', which prevents a costly misuse. The only thing left implicit is whether calling it repeatedly burns quota or whether grants expire unobserved — a minor residual gap.

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 purpose, sequencing and exclusion are front-loaded in the first two sentences, and the operational contract (PUT to upload_url with the given headers, pass key downstream) follows in the right order. It runs long and repeats the format/size constraints already in the schema, which is the only thing keeping it from a 5.

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?

An output schema exists, yet the description still summarizes the returned fields and, more importantly, tells the agent what to do with them (PUT the bytes, then pass key into images/add). Combined with the failure mode and the moderation note, nothing an agent needs in order to call this correctly is missing.

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%, so both content_type and file_size are already fully documented with enums and a maximum. The description restates the accepted formats and the 10 MB cap rather than adding syntax or semantics the schema lacks, so it sits at the baseline with no extra value.

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 — 'Request a short-lived upload grant for ONE image file' — and immediately frames it as 'step 1 of attaching a photo', which positions it against create_listing and update_listing_images. The agent can distinguish this tool from its siblings 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 positive triggers ('user wants a photo on a new listing' → create_listing; 'added to an existing one' → update_listing_images), explicit exclusions ('Do not use it when you only have an image URL'), and hard limits ('once per image, maximum 6 images per listing'). This is the full when/when-not/alternative triad.

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