Skip to main content
Glama

Upload a file

upload_media
Destructive

Add a listing photo, logo or headshot to the account from an https link (JPG, PNG, WebP or HEIC, up to 25 MB) or base64 (up to about 3 MB of file). Returns a storageId for add_photos, replace_photo, set_logo or set_headshot.

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": {
      "listingId": "<listingId>",
      "kind": "<kind>",
      "filename": "<filename>"
    },
    "name": "upload_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoAn https link the server fetches.
kindYesWhat the file is for: photo (a listing photo), logo or headshot.
base64NoThe file's bytes, base64 encoded.
filenameYesThe file's name, like 'kitchen.jpg'; used to label it.
listingIdYesListing id from list_listings.

Output Schema

NameRequiredDescriptionDefault
statusNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / filename / description
      Added value: +"The file's name, like 'kitchen.jpg'; used to label it."
    • addedInput schema / properties / kind / description
      Added value: +"What the file is for: photo (a listing photo), logo or headshot."
  2. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=false and openWorldHint=true; the description adds real value beyond them with concrete size ceilings (25 MB via https, ~3 MB via base64) and accepted formats. It says nothing, however, about why the operation is flagged destructive, whether re-uploading the same file creates a duplicate asset, or any auth/quota context, which are the questions those annotations raise.

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?

Two dense sentences, front-loaded with the action, then constraints, then the return value and its consumers. No filler or repetition of the field descriptions.

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 five-parameter mutation with an output schema and full schema coverage, the description covers formats, size limits, input channels and the downstream contract. The gaps are the mutual exclusivity of url/base64 and the destructive/idempotency implications flagged by annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning the schema does not: the size limits are asymmetric by channel, implicitly telling the agent that url and base64 are alternative inputs with different capacity. It still does not state whether exactly one of url/base64 is required.

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 ('Add a listing photo, logo or headshot to the account') plus the input channels and the return value (storageId). Naming add_photos, replace_photo, set_logo and set_headshot as consumers makes clear this is the upload step that precedes them, so an agent can separate it from those siblings.

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?

The description makes the workflow clear: upload here, then pass the storageId to add_photos/replace_photo/set_logo/set_headshot. What it lacks is explicit routing for the obvious alternative in the sibling list, request_photo_upload, and any statement of when not to call it.

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