Skip to main content
Glama

Set an item's photos

set_item_photos
DestructiveIdempotent

Give ONE catalog item (a product, room, dish…) its photos: add several, choose the lead photo, and tie photos to an option such as a colour, so the product page shows the blue photos when a shopper picks Blue. Use this for every photo change on an item, never update_collection_item. Name the item by item_id, or collection_type plus its slug or title. To tag photos by colour the item needs those options (variants.axes); an unknown option is refused with the item's options. A visible item's change reaches the public site by collection auto-publish.

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": {
      "site_id": "<site_id>",
      "photos": "<photos>"
    },
    "name": "set_item_photos"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemNoThe item's slug, or its exact current title. A title shared by several items is refused with their slugs.
modeNo"add" (default) keeps the item's photos and adds these; sending a photo the item already has (same URL) updates it, which is how you re-tag or re-order the lead. "replace" makes these the item's whole set.
photosYes
item_idNoThe item's id (from list_collection_items). Preferred.
site_idYesThe site the collection belongs to
user_goalNoOptional: the user's goal behind this call, in one short sentence of plain words (e.g. "add a page so customers can book tables"). No names, emails or other personal details.
collection_typeNoThe collection, when naming the item by `item` instead of `item_id`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and openWorldHint=true, so the mutation and repeat-safety profile is covered. The description adds genuinely useful context beyond that: an unknown option is refused along with the item's valid options, and a visible item's change propagates to the public site via collection auto-publish. It does not, however, flag the destructive consequence of 'replace' mode (dropping the item's existing photos) or describe the response.

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?

Three sentences, front-loaded with the core action and followed by the routing rule and the two guardrails; no filler or restatement of the name. Some clauses are dense (option tagging plus its prerequisite plus the refusal behavior in one sentence), which slightly reduces scannability.

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?

With 7 parameters, no output schema, and a nested photo object, the description covers addressing, routing, validation failure, and publish side effects, which is what an agent needs to call it correctly. The remaining gap is the return value and what a partial failure looks like, which is minor given the rich schema descriptions.

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 description coverage is already 86%, so the baseline is 3, and the description earns above that by explaining the two naming paths and by stating that option_value must match one of the item's values as returned in variants.axes, with the consequence of a mismatch. It leaves the interaction between mode=add and re-sending an existing URL to the schema, which is acceptable.

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?

The opening sentence names a specific verb and resource ('Give ONE catalog item ... its photos') and enumerates the three sub-actions it performs: adding photos, setting the lead, and tying photos to an option. It explicitly distinguishes itself from the sibling update_collection_item, so an agent can route correctly without opening a 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?

It states an explicit exclusive rule ('Use this for every photo change on an item, never update_collection_item') and gives the conditions for the two addressing styles (item_id, or collection_type plus slug/title). It also states the prerequisite for option tagging (the item needs variants.axes) and what happens when that prerequisite fails.

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