Skip to main content
Glama

Generate image

generate_image

Start generating a NEW image from a text prompt in a thread (create one with create_thread first). Spends credits; use estimate_cost first if unsure. Optionally pass sourceFileIds (file ids from upload_image or the library) as visual inputs. Use @Name to reference a named reference. Returns immediately with a nodeId and status; poll get_generation_status until it is COMPLETED or FAILED.

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

Input Schema

NameRequiredDescriptionDefault
promptYesWhat to generate.
qualityNoImage quality. Defaults to high.
modelKeyNoOptional model key from list_models; overrides quality-based routing.
threadIdYesThread to generate in.
aspectRatioNoAspect ratio. Defaults to auto.
sourceFileIdsNoOptional input image file ids.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond annotations, it discloses the important behavioral traits: the call spends credits, returns immediately with a nodeId and status, and requires polling get_generation_status until COMPLETED or FAILED. These are exactly the operational details an agent needs for an asynchronous, credit-consuming generation tool.

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?

The description is four tight sentences, front-loads the core action, and follows with prerequisites, cost warning, optional inputs, and async lifecycle. Every sentence carries actionable information with no filler.

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 a non-idempotent, credit-spending async generation tool, the description covers prerequisites, cost consideration, optional source images, reference syntax, and the full polling lifecycle. With rich schema descriptions and annotations already present, nothing essential 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 the structural parameter documentation is already strong. The description still adds useful meaning by explaining that sourceFileIds are visual inputs sourced from upload_image or the library and that @Name references named references, though it does not elaborate on quality, modelKey, or aspectRatio beyond the schema.

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 states a specific verb and resource: start generating a NEW image from a text prompt in a thread. The emphasis on NEW distinguishes it from image-editing siblings such as edit_image, and the thread scoping makes the operation concrete.

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?

It gives clear prerequisite and alternative guidance: create a thread first, use estimate_cost if unsure, and pass sourceFileIds from upload_image or the library for visual inputs. It does not explicitly state when to prefer a sibling like edit_image or generate_video, so it falls just short of fully explicit when/when-not guidance.

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