Skip to main content
Glama

Generate image

generate_image

Create 1-4 images from a written description: a still, the first frame or a character reference for a video, a thumbnail, an ad image. For a set of different shots, pass up to 4 prompts (one image each) in one call instead of prompt. Returns the finished images in the conversation, usually in 10-40 seconds; if a slow model is still rendering when the wait ends, the reply carries a job_id for check_generation. Spends the workspace's Masonry credits — roughly 5-30 credits per image depending on the model; call list_models for the exact per-model price. For a one-off scene preserving a real product, person or logo, pass reference_image_url (a direct image URL) or product_url (a product page Masonry will pull the real photo from) — without one the model invents a look-alike. To combine several images in one (a person, a product and a setting), pass them all as reference_image_urls. A product photo set (product photography, ad shoots, packshots) from two or more photos of one product is a Studio shoot instead: add_reference_image, then start_product_shoot. With one photo or a product URL, make the shots here with it as the reference. Call list_skills and pass skill_slug when the request matches a Masonry skill. Skill text is guidance; write prompt from the user's request. Omit model for the workspace default; pass style for a look preset.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "generate_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoOptional model key (see list_models). Defaults to the workspace's default image model, or an edit-capable model when a reference is supplied.
styleNoOptional look/style preset, blended into the prompt. One of: photorealistic, cinematic, editorial, film, product, render_3d, anime, watercolor, line_art, vintage. Omit for the model's native look.
promptNoText prompt describing the image to generate. Required unless prompts is given.
promptsNoUp to 4 different images in one call, one complete self-contained description per image (each describes a single image, not the set). Use instead of prompt; model, aspect_ratio, style and the reference apply to every image.
charactersNoWorkspace characters by name (see list_characters). Each one's sheet becomes a reference so the same person, creature or mascot stays the same. Takes the place of reference_image_url. Meant for a character the user named. With skill_slug, a name from that template's cast (read_skill lists it) is added to the workspace on first use, free.
skill_slugNoOptional Masonry skill slug from list_skills. Uses the selected skill for provenance and model routing only; skill text is guidance, and the prompt describes the user's request.
num_outputsNoTakes of the same prompt (1-4); every output follows the one prompt, so a prompt that describes several images does not make them. Different looks, angles or scenes go in prompts, one complete description per image. Default 1.
product_urlNoHttps product/page URL. Masonry extracts a real product image from the page and uses those pixels as a reference in the generated scene. Provide this OR reference_image_url.
aspect_ratioNoOptional aspect ratio. Any ratio the chosen model supports (list_models shows each model's ratios), e.g. 4:5, 16:9, 9:16, or an exact WIDTHxHEIGHT on models that accept custom sizes. An unsupported ratio is refused with the model's supported list; nothing is silently substituted. Omit for the model's default size.
reference_image_urlNoDirect https URL (or masonry:// reference from add_reference_image) of a product/person/logo/reference image to preserve in a new generated scene. Provide this OR product_url, not both.
reference_image_urlsNoSeveral reference images to combine in one new image: direct https image URLs or masonry:// references (masonry://generations/<job_id> for an image made earlier), in the order the prompt cites them. Only models that take more than one reference use them (list_models marks them refs, with their limit); a list longer than the model's limit is refused and nothing is dropped. Use instead of reference_image_url, product_url and characters.

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?

Despite annotations covering safety (readOnlyHint=false, openWorldHint=true, non-idempotent, non-destructive), the description adds material behavior the annotations cannot express: credit spend (roughly 5-30 per image) with a pointer to list_models for exact pricing, latency of 10-40 seconds, the async job_id escape hatch, and the refusal semantics for unsupported aspect ratios. It also discloses the consequence of omitting a reference ('the model invents a look-alike'), which is exactly the kind of side effect an agent needs.

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 core action and return behavior before cost, then references, then the Studio-shoot carve-out, so a reader can stop early and still call it correctly. It is dense and long (roughly eleven sentences with heavy parentheticals), and the sibling mentions are scattered mid-paragraph rather than grouped, costing some scannability.

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 an 11-parameter, no-output-schema, expensive generation tool, it covers what an agent needs: inputs, exclusivity between reference parameters, cost, latency, async continuation, and refusal behavior. Nothing material is left to inference, and no field contradicts the supplied 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 description coverage is 100%, so a 3 is the floor; the description goes beyond it by disambiguating the pair that is easiest to confuse — `prompts` = different images, `num_outputs` = takes of the same prompt — and by explaining reference ordering and the characters-vs-reference substitution. It adds real semantics on top of already-thorough schema text, though much of the detail is duplicated rather than new.

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?

Opens with a concrete verb and resource ('Create 1-4 images from a written description') and immediately enumerates the concrete outputs (still, first frame, character reference, thumbnail, ad image). It also differentiates against siblings by name (check_generation, list_models, list_skills, add_reference_image/start_product_shoot), so an agent can route without opening other schemas.

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 either/or routing rules: `prompts` (up to 4 different shots) instead of `prompt` for a set; `reference_image_url`/`product_url` for preserving a real subject; `reference_image_urls` for combining several; and a named alternative path (add_reference_image then start_product_shoot) for a multi-photo product shoot. It also states when to skip fields ('Omit `model` for the workspace default') and when to fall back to check_generation.

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