Skip to main content
Glama

Generate image

generate_image

Start an image from text (a model with mode text-to-image), or edit / combine images (a model with mode image-to-image: pass them in images). Take the model id and its options from list_models. Spends credits: tell the user the price from list_models first. Returns a taskId; most images take 10–60 seconds. Failed generations are refunded automatically. Images must be public https URLs; use upload_media for the user's own files.

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": {
      "model": "<model>"
    },
    "name": "generate_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelYesAn image model id from list_models.
imagesNoImage-to-image: the images to edit or combine.
promptNoWhat the image shows, or what to change.
resolutionNoOne of the model's resolutions. Default: its first.
aspect_ratioNoOne of the model's aspect ratios. Default: 1:1 where offered.
output_formatNogif: only text-to-image on models with gifOutput.
transparent_backgroundNoOnly for models with transparentBackground.

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?

Beyond the annotations (non-readonly, non-destructive, non-idempotent, non-open-world), it discloses cost behavior (spends credits, check price first), latency (10–60 seconds), the return value (taskId), the refund policy on failure, and an input constraint (public https URLs only). This is exactly the added context annotations cannot carry.

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?

Four sentences, front-loaded with the primary action and mode split, then cost, then return/timing, then input constraint. Every clause carries an actionable fact; no filler or restatement of the name.

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 7-parameter generation tool with no output schema, it covers cost, async behavior (taskId), timing, failure handling, and URL requirements. Minor gaps remain, such as whether the taskId is polled via get_task, which the agent must infer.

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 still adds value by explaining that `images` triggers image-to-image mode and that `model` and its dependent options (resolution, aspect_ratio) must come from list_models. It does not explain output_format/transparent_background gating beyond what the schema already states.

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 action on a specific resource and splits it into two distinct modes: text-to-image and image-to-image via `images`. The agent can tell exactly what this tool produces without opening the 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?

Gives explicit routing: pass source images in `images` to edit/combine, otherwise use text-to-image; pull the model id and options from list_models; use upload_media for the user's own files. It also imposes a required precondition (tell the user the price first), leaving nothing to inference.

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.