Skip to main content
Glama

reeflip

Add an uploaded photo

add_photo

For agents that send files themselves: adds the photo sent to start_photo_upload's link to the business, once it has arrived (photo_not_uploaded before), and with product_id to that product too, after its last photo, when the plan has room for one more on it (otherwise plan_limit). Its type is read from the file itself: anything but a JPEG, PNG, WebP, AVIF or HEIC photo is refused with photo_type_not_allowed.

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": {
      "photo_id": "<photo_id>"
    },
    "name": "add_photo"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameNoThe file's name on your computer, to recognise it by.
photo_idYesFrom Start uploading a photo.
product_idNoA product the photo joins, after its last photo.

Output Schema

NameRequiredDescriptionDefault
idYes
urlYesWhere its sizes are, once ready: add `/{width}.webp` for a width in `webp_widths`, or `/{width}.avif` for one in `avif_widths`.
widthYesOnce ready: its width, turned upright.
heightYesOnce ready: its height, turned upright.
statusYesuploaded until its sizes are made; ready after; failed when they could not be.
filenameYes
created_atYes
jpeg_widthYesOnce ready: the width of its JPEG copy, under {media}/{business_id}/{id}/{width}.jpg, for drawing pages as pictures; null before, and for photos made before copies were.
size_bytesYes
avif_widthsYesThe widths made in AVIF, under {media}/{business_id}/{id}/{width}.avif.
placeholderYesOnce ready: a tiny WebP as a data: URI, to show blurred while the photo loads; empty before.
webp_widthsYesThe widths made in WebP, under {media}/{business_id}/{id}/{width}.webp.
content_typeYesRead from the file itself.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare it is a non-destructive, non-idempotent write; the description adds substantive behavior the annotations cannot convey: accepted file types read from the file itself, the exact refusal codes, the plan capacity gate, and append-at-end ordering. This is exactly the context an agent needs before invoking.

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-loads the audience/condition clause and packs prerequisites, ordering, and error codes without filler. The sentence is long and parenthetical-heavy, which slightly hurts scanability, but no clause is redundant.

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 3-parameter write tool with an output schema (so return values need no explanation), the description covers prerequisites, failure modes, and side-effect ordering completely. Nothing needed to call it correctly is missing.

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; the description goes beyond it by explaining photo_id's provenance (from start_photo_upload) and product_id's placement semantics (joins after the product's last photo). It adds nothing for filename, but that parameter is already self-documented in the schema.

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 ('adds the photo ... to the business' and optionally 'to that product too'), and the opening clause 'For agents that send files themselves' separates it from the URL-based sibling add_photo_from_url without needing either schema opened.

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 the precondition (photo must have been sent to start_photo_upload's link and arrived, else photo_not_uploaded), the ordering rule (appended after the product's last photo), and the capacity condition (plan_limit otherwise). The when-to-use condition versus a URL-submitting agent is stated explicitly in the first clause.

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