Skip to main content
Glama

Generate product photos

generate_product_images
Idempotent

Create 1 hero or 4 Product Cards Studio frames from the exact product photo: hero, benefits (another angle), lifestyle, detail. Saved per-frame progress and partial results. A live server-side spending permission may authorize the quoted maximum immediately; otherwise the owner approves at approval_url, then repeat identical arguments and request_id. Send expected_max_credits from quote_product_images. Poll get_product_operation to advance the durable series. Unknown outcomes never retry a paid step.

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": {
      "product": "<product>",
      "reference": "<reference>",
      "request_id": "<request_id>",
      "confirm_spend": "<confirm_spend>"
    },
    "name": "generate_product_images"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNocard
noteNo
countNo
modelNonano2
localeNoru
productYes
qualityNostandard
style_idNo
referenceYes
request_idYes
aspect_ratioNo1:1
confirm_spendYes
analyze_referenceNo
frame_instructionsNo
expected_max_creditsNoMaximum total AI credits from quote_product_images, including optional description. Required for delegated spending; older clients use manual approval.
generate_descriptionNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / model / enum
      Previous value: -[
      -  "nano",
      -  "nano2",
      -  "nano-pro",
      -  "gemini",
      -  "seedream"
      -]New value: +[
      +  "nano",
      +  "nano2",
      +  "nano-pro",
      +  "gemini",
      +  "seedream",
      +  "lite"
      +]
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "analysis": {
      -        "anyOf": [
      -          {
      -            "type": "null"
      -          },
      -          {
      -            "additionalProperties": false,
      -            "properties": {
      -              "analysis": {
      -                "additionalProperties": false,
      -                "properties": {
      -                  "attributes": {
      -                    "items": {
      -                      "additionalProperties": false,
      -                      "properties": {
      -                        "label": {
      -                          "maxLength": 36,
      -                          "type": "string"
      -                        },
      -                        "value": {
      -                          "maxLength": 100,
      -                          "type": "string"
      -                        }
      -                      },
      -                      "required": [
      -                        "label",
      -                        "value"
      -                      ],
      -                      "type": "object"
      -                    },
      -                    "maxItems": 6,
      -                    "type": "array"
      -                  },
      -                  "category": {
      -                    "enum": [
      -                      "fashion",
      -                      "home",
      -                      "beauty",
      -                      "kids",
      -                      "electronics",
      -                      "sport",
      -                      "pets",
      -                      "hobby",
      -                      "food",
      -                      "auto",
      -                      "garden",
      -                      "construction",
      -                      "stationery",
      -                      "other"
      -                    ]
      -                  },
      -                  "product_name": {
      -                    "maxLength": 80,
      -                    "type": "string"
      -                  },
      -                  "product_type": {
      -                    "maxLength": 80,
      -                    "type": "string"
      -                  },
      -                  "suggested_card_styles": {
      -                    "items": {
      -                      "type": "string"
      -                    },
      -                    "maxItems": 4,
      -                    "type": "array"
      -                  },
      -                  "suggested_photoshoot_styles": {
      -                    "items": {
      -                      "type": "string"
      -                    },
      -                    "maxItems": 4,
      -                    "type": "array"
      -                  }
      -                },
      -                "required": [
      -                  "category",
      -                  "product_name",
      -                  "product_type",
      -                  "attributes",
      -                  "suggested_card_styles",
      -                  "suggested_photoshoot_styles"
      -                ],
      -                "type": "object"
      -              },
      -              "error": {
      -                "type": "string"
      -              },
      -              "status": {
      -                "enum": [
      -                  "pending",
      -                  "running",
      -                  "complete",
      -                  "failed",
      -                  "unknown",
      -                  "skipped"
      -                ]
      -              },
      -              "step_id": {
      -                "format": "uuid",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "step_id",
      -              "status"
      -            ],
      -            "type": "object"
      -          }
      -        ]
      -      },
      -      "approval_url": {
      -        "type": "string"
      -      },
      -      "confirmation_reason": {
      -        "type": "string"
      -      },
      -      "credits_charged": {
      -        "minimum": 0,
      -        "type": "integer"
      -      },
      -      "description": {
      -        "anyOf": [
      -          {
      -            "type": "null"
      -          },
      -          {
      -            "additionalProperties": false,
      -            "properties": {
      -              "description": {
      -                "additionalProperties": false,
      -                "properties": {
      -                  "bullets": {
      -                    "items": {
      -                      "maxLength": 220,
      -                      "type": "string"
      -                    },
      -                    "maxItems": 8,
      -                    "type": "array"
      -                  },
      -                  "summary": {
      -                    "maxLength": 4008,
      -                    "type": "string"
      -                  },
      -                  "title": {
      -                    "maxLength": 140,
      -                    "type": "string"
      -                  }
      -                },
      -                "required": [
      -                  "title",
      -                  "summary",
      -                  "bullets"
      -                ],
      -                "type": "object"
      -              },
      -              "error": {
      -                "type": "string"
      -              },
      -              "status": {
      -                "enum": [
      -                  "pending",
      -                  "running",
      -                  "complete",
      -                  "failed",
      -                  "unknown",
      -                  "skipped"
      -                ]
      -              },
      -              "step_id": {
      -                "format": "uuid",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "step_id",
      -              "status"
      -            ],
      -            "type": "object"
      -          }
      -        ]
      -      },
      -      "frames": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "credits_charged": {
      -              "minimum": 0,
      -              "type": "integer"
      -            },
      -            "credits_refunded": {
      -              "minimum": 0,
      -              "type": "integer"
      -            },
      -            "error": {
      -              "type": "string"
      -            },
      -            "id": {
      -              "format": "uuid",
      -              "type": "string"
      -            },
      -            "image": {
      -              "type": "string"
      -            },
      -            "mime_type": {
      -              "enum": [
      -                "image/png",
      -                "image/jpeg",
      -                "image/webp"
      -              ]
      -            },
      -            "scene": {
      -              "enum": [
      -                "hero",
      -                "benefits",
      -                "lifestyle",
      -                "detail"
      -              ]
      -            },
      -            "status": {
      -              "enum": [
      -                "pending",
      -                "running",
      -                "complete",
      -                "failed",
      -                "unknown",
      -                "skipped"
      -              ]
      -            },
      -            "step_id": {
      -              "format": "uuid",
      -              "type": "string"
      -            },
      -            "url_expires_in_seconds": {
      -              "const": 3600
      -            }
      -          },
      -          "required": [
      -            "step_id",
      -            "status",
      -            "scene",
      -            "credits_charged",
      -            "credits_refunded"
      -          ],
      -          "type": "object"
      -        },
      -        "maxItems": 4,
      -        "type": "array"
      -      },
      -      "message": {
      -        "type": "string"
      -      },
      -      "next": {
      -        "const": "get_product_operation"
      -      },
      -      "poll_after_seconds": {
      -        "const": 5
      -      },
      -      "progress": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "completed_frames": {
      -            "minimum": 0,
      -            "type": "integer"
      -          },
      -          "finished_steps": {
      -            "minimum": 0,
      -            "type": "integer"
      -          },
      -          "total_frames": {
      -            "minimum": 0,
      -            "type": "integer"
      -          },
      -          "total_steps": {
      -            "minimum": 0,
      -            "type": "integer"
      -          }
      -        },
      -        "required": [
      -          "completed_frames",
      -          "total_frames",
      -          "finished_steps",
      -          "total_steps"
      -        ],
      -        "type": "object"
      -      },
      -      "quote": {
      -        "anyOf": [
      -          {
      -            "additionalProperties": false,
      -            "properties": {
      -              "analysis_credits": {
      -                "const": 0
      -              },
      -              "aspect_ratio": {
      -                "enum": [
      -                  "1:1",
      -                  "16:9",
      -                  "9:16",
      -                  "4:3",
      -                  "3:4"
      -                ]
      -              },
      -              "count": {
      -                "enum": [
      -                  1,
      -                  4
      -                ]
      -              },
      -              "currency": {
      -                "const": "ai_credits"
      -              },
      -              "description_credits": {
      -                "enum": [
      -                  0,
      -                  1
      -                ]
      -              },
      -              "free_photo_used": {
      -                "const": false
      -              },
      -              "maximum": {
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "model": {
      -                "enum": [
      -                  "nano",
      -                  "nano2",
      -                  "nano-pro",
      -                  "gemini",
      -                  "seedream"
      -                ]
      -              },
      -              "per_image": {
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "quality": {
      -                "enum": [
      -                  "standard",
      -                  "high"
      -                ]
      -              }
      -            },
      -            "required": [
      -              "currency",
      -              "per_image",
      -              "maximum",
      -              "count",
      -              "model",
      -              "quality",
      -              "aspect_ratio",
      -              "description_credits",
      -              "analysis_credits",
      -              "free_photo_used"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "additionalProperties": false,
      -            "properties": {
      -              "analysis_credits": {
      -                "const": 0
      -              },
      -              "currency": {
      -                "const": "ai_credits"
      -              },
      -              "description_credits": {
      -                "const": 1
      -              },
      -              "kind": {
      -                "const": "description"
      -              },
      -              "maximum": {
      -                "const": 1
      -              }
      -            },
      -            "required": [
      -              "kind",
      -              "currency",
      -              "maximum",
      -              "description_credits",
      -              "analysis_credits"
      -            ],
      -            "type": "object"
      -          }
      -        ]
      -      },
      -      "request_id": {
      -        "format": "uuid",
      -        "type": "string"
      -      },
      -      "status": {
      -        "enum": [
      -          "awaiting_confirmation",
      -          "approved",
      -          "denied",
      -          "running",
      -          "complete",
      -          "partial",
      -          "failed",
      -          "unknown"
      -        ]
      -      }
      -    },
      -    "required": [
      -      "request_id",
      -      "status",
      -      "progress",
      -      "frames",
      -      "description",
      -      "analysis",
      -      "credits_charged",
      -      "next",
      -      "poll_after_seconds"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "error": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "error"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "analysis": {
      +        "anyOf": [
      +          {
      +            "type": "null"
      +          },
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "analysis": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "attributes": {
      +                    "items": {
      +                      "additionalProperties": false,
      +                      "properties": {
      +                        "label": {
      +                          "maxLength": 36,
      +                          "type": "string"
      +                        },
      +                        "value": {
      +                          "maxLength": 100,
      +                          "type": "string"
      +                        }
      +                      },
      +                      "required": [
      +                        "label",
      +                        "value"
      +                      ],
      +                      "type": "object"
      +                    },
      +                    "maxItems": 6,
      +                    "type": "array"
      +                  },
      +                  "category": {
      +                    "enum": [
      +                      "fashion",
      +                      "home",
      +                      "beauty",
      +                      "kids",
      +                      "electronics",
      +                      "sport",
      +                      "pets",
      +                      "hobby",
      +                      "food",
      +                      "auto",
      +                      "garden",
      +                      "construction",
      +                      "stationery",
      +                      "other"
      +                    ]
      +                  },
      +                  "product_name": {
      +                    "maxLength": 80,
      +                    "type": "string"
      +                  },
      +                  "product_type": {
      +                    "maxLength": 80,
      +                    "type": "string"
      +                  },
      +                  "suggested_card_styles": {
      +                    "items": {
      +                      "type": "string"
      +                    },
      +                    "maxItems": 4,
      +                    "type": "array"
      +                  },
      +                  "suggested_photoshoot_styles": {
      +                    "items": {
      +                      "type": "string"
      +                    },
      +                    "maxItems": 4,
      +                    "type": "array"
      +                  }
      +                },
      +                "required": [
      +                  "category",
      +                  "product_name",
      +                  "product_type",
      +                  "attributes",
      +                  "suggested_card_styles",
      +                  "suggested_photoshoot_styles"
      +                ],
      +                "type": "object"
      +              },
      +              "error": {
      +                "type": "string"
      +              },
      +              "status": {
      +                "enum": [
      +                  "pending",
      +                  "running",
      +                  "complete",
      +                  "failed",
      +                  "unknown",
      +                  "skipped"
      +                ]
      +              },
      +              "step_id": {
      +                "format": "uuid",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "step_id",
      +              "status"
      +            ],
      +            "type": "object"
      +          }
      +        ]
      +      },
      +      "approval_url": {
      +        "type": "string"
      +      },
      +      "confirmation_reason": {
      +        "type": "string"
      +      },
      +      "credits_charged": {
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "description": {
      +        "anyOf": [
      +          {
      +            "type": "null"
      +          },
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "description": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "bullets": {
      +                    "items": {
      +                      "maxLength": 220,
      +                      "type": "string"
      +                    },
      +                    "maxItems": 8,
      +                    "type": "array"
      +                  },
      +                  "summary": {
      +                    "maxLength": 4008,
      +                    "type": "string"
      +                  },
      +                  "title": {
      +                    "maxLength": 140,
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "title",
      +                  "summary",
      +                  "bullets"
      +                ],
      +                "type": "object"
      +              },
      +              "error": {
      +                "type": "string"
      +              },
      +              "status": {
      +                "enum": [
      +                  "pending",
      +                  "running",
      +                  "complete",
      +                  "failed",
      +                  "unknown",
      +                  "skipped"
      +                ]
      +              },
      +              "step_id": {
      +                "format": "uuid",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "step_id",
      +              "status"
      +            ],
      +            "type": "object"
      +          }
      +        ]
      +      },
      +      "frames": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "credits_charged": {
      +              "minimum": 0,
      +              "type": "integer"
      +            },
      +            "credits_refunded": {
      +              "minimum": 0,
      +              "type": "integer"
      +            },
      +            "error": {
      +              "type": "string"
      +            },
      +            "id": {
      +              "format": "uuid",
      +              "type": "string"
      +            },
      +            "image": {
      +              "type": "string"
      +            },
      +            "mime_type": {
      +              "enum": [
      +                "image/png",
      +                "image/jpeg",
      +                "image/webp"
      +              ]
      +            },
      +            "scene": {
      +              "enum": [
      +                "hero",
      +                "benefits",
      +                "lifestyle",
      +                "detail"
      +              ]
      +            },
      +            "status": {
      +              "enum": [
      +                "pending",
      +                "running",
      +                "complete",
      +                "failed",
      +                "unknown",
      +                "skipped"
      +              ]
      +            },
      +            "step_id": {
      +              "format": "uuid",
      +              "type": "string"
      +            },
      +            "url_expires_in_seconds": {
      +              "const": 3600
      +            }
      +          },
      +          "required": [
      +            "step_id",
      +            "status",
      +            "scene",
      +            "credits_charged",
      +            "credits_refunded"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 4,
      +        "type": "array"
      +      },
      +      "message": {
      +        "type": "string"
      +      },
      +      "next": {
      +        "const": "get_product_operation"
      +      },
      +      "poll_after_seconds": {
      +        "const": 5
      +      },
      +      "progress": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "completed_frames": {
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "finished_steps": {
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "total_frames": {
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "total_steps": {
      +            "minimum": 0,
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "completed_frames",
      +          "total_frames",
      +          "finished_steps",
      +          "total_steps"
      +        ],
      +        "type": "object"
      +      },
      +      "quote": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "analysis_credits": {
      +                "const": 0
      +              },
      +              "aspect_ratio": {
      +                "enum": [
      +                  "1:1",
      +                  "16:9",
      +                  "9:16",
      +                  "4:3",
      +                  "3:4"
      +                ]
      +              },
      +              "count": {
      +                "enum": [
      +                  1,
      +                  4
      +                ]
      +              },
      +              "currency": {
      +                "const": "ai_credits"
      +              },
      +              "description_credits": {
      +                "enum": [
      +                  0,
      +                  1
      +                ]
      +              },
      +              "free_photo_used": {
      +                "const": false
      +              },
      +              "maximum": {
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "model": {
      +                "enum": [
      +                  "nano",
      +                  "nano2",
      +                  "nano-pro",
      +                  "gemini",
      +                  "seedream",
      +                  "lite"
      +                ]
      +              },
      +              "per_image": {
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "quality": {
      +                "enum": [
      +                  "standard",
      +                  "high"
      +                ]
      +              }
      +            },
      +            "required": [
      +              "currency",
      +              "per_image",
      +              "maximum",
      +              "count",
      +              "model",
      +              "quality",
      +              "aspect_ratio",
      +              "description_credits",
      +              "analysis_credits",
      +              "free_photo_used"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "analysis_credits": {
      +                "const": 0
      +              },
      +              "currency": {
      +                "const": "ai_credits"
      +              },
      +              "description_credits": {
      +                "const": 1
      +              },
      +              "kind": {
      +                "const": "description"
      +              },
      +              "maximum": {
      +                "const": 1
      +              }
      +            },
      +            "required": [
      +              "kind",
      +              "currency",
      +              "maximum",
      +              "description_credits",
      +              "analysis_credits"
      +            ],
      +            "type": "object"
      +          }
      +        ]
      +      },
      +      "request_id": {
      +        "format": "uuid",
      +        "type": "string"
      +      },
      +      "status": {
      +        "enum": [
      +          "awaiting_confirmation",
      +          "approved",
      +          "denied",
      +          "running",
      +          "complete",
      +          "partial",
      +          "failed",
      +          "unknown"
      +        ]
      +      }
      +    },
      +    "required": [
      +      "request_id",
      +      "status",
      +      "progress",
      +      "frames",
      +      "description",
      +      "analysis",
      +      "credits_charged",
      +      "next",
      +      "poll_after_seconds"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "error": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "error"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. First observed

TDQS

A4.2/5.0
Behavior5/5

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

The annotations only say this is not read-only, is idempotent and open-world; the description adds the crucial traits the annotations lack: an immediate server-side spending authorization possible, an async approval_url flow, partial results and per-frame saved progress, durable-series polling, and a hard no-retry rule for unknown outcomes.

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?

There is little filler, and the key constraints (spend, approval, idempotent retry, polling) come first. The telegraphic phrasing works against clarity: sentences such as 'Unknown outcomes never retry a paid step' take extra parsing before their meaning becomes clear.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a costly, multi-step async tool the description covers the high-risk workflow (quote → spend cap → approval → poll), and having an output schema means return values need not be explained here. But with 16 parameters at 6% schema coverage, and nested product, frame_instructions, and reference objects undocumented, a caller still has to infer a lot.

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 only 6% for 16 parameters, so the description must compensate. It explains expected_max_credits (derived from quote_product_images), request_id reuse, and the count semantics of 1 hero vs 4 frames, but it says nothing about mode, model, quality, style_id, aspect_ratio, locale, product, note, frame_instructions, analyze_reference, or generate_description.

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 description opens with a specific verb+resource ('Create 1 hero or 4 ... frames from the exact product photo') and enumerates the four frame types (hero, benefits/an alternate angle, lifestyle, detail), so an agent can tell exactly what a call produces and how the count option changes the output shape.

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 gives explicit sequence guidance: get credits from quote_product_images, send that as expected_max_credits, then, if approval is required, have the owner approve at approval_url and repeat identical arguments and request_id; finally poll get_product_operation. It also gives an exclusion rule: if the outcome is unknown, never retry a paid step. The only gap is that it does not distinguish this tool from generate_image or generate_3d.

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.