Skip to main content
Glama

Generate image

generate_image

Generate an image from a text prompt. Inputs: workspace_key and prompt (subject, style, composition); optional model (nano_banana, nano_banana_2, gpt_image, or seedream; default is the workspace's model), aspect_ratio (for example "1:1", "9:16", "16:9"; default square), apply_visual_style (adds the workspace's brand visual style to the prompt), and reference_image_urls (up to 6 public image URLs, for example from search_media or an earlier result, to keep a subject, product, or person).

Generation runs in the background and usually takes 1-5 minutes. The tool returns a request id at once; call get_generated_image with it every 15-30 seconds until it is done. The image is not added to the media library. Its URL can be used in compose_design, set_design_background, or replace_design_image.

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

Input Schema

NameRequiredDescriptionDefault
modelNoOptional image model. Omit to use the workspace default.
promptYesWhat the image should depict — subject, style, composition. Required.
aspect_ratioNoOptional aspect ratio, e.g. "1:1", "9:16", "16:9". Defaults to square.
workspace_keyYesKey of the workspace to act in. Call list_workspaces to see the workspaces you have access to and their keys.
apply_visual_styleNoOptional. Layer the workspace's brand visual style onto the prompt. Defaults to false.
reference_image_urlsNoOptional public image URLs for image-to-image. Up to 6.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare the safety profile (non-idempotent, open-world); the description adds the operationally critical facts an agent needs: it is asynchronous, takes 1-5 minutes, returns a request id immediately, requires polling get_generated_image every 15-30 seconds, and that the image is not persisted to the media library. That is substantial context beyond the structured fields.

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-loaded with the verb and purpose, then inputs, then async behavior and follow-up steps in a logical order. The parameter enumeration in parentheses duplicates schema content somewhat, but no sentence is filler given the async contract that must be conveyed.

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?

With six parameters, an open-world non-idempotent annotation profile, and no output schema, the description covers everything needed: required inputs, defaults, limits (up to 6 URLs), latency, the returned request id, the polling loop, and where the resulting URL can be used. Nothing an agent needs 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 baseline is 3, and the description adds genuine meaning: it names the four available models and that the default is workspace-specific, gives aspect ratio examples with the square default, explains apply_visual_style as brand style layering, and clarifies that reference images are for preserving a subject, product, or person (sourcing them from search_media).

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 ('Generate an image from a text prompt') and immediately scopes it with text-to-image and image-to-image inputs. It is distinguishable from siblings like generate_post, search_media, or compose_design, which are named only as consumers of the output.

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?

Explains the downstream workflow explicitly: the result is not stored in the media library and its URL is meant for compose_design, set_design_background, or replace_design_image, and reference images come from search_media or earlier results. It lacks an explicit 'when not to use this vs generate_post' statement, so it stops short of full alternative routing.

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.