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). modelKey comes from list_models (an image model). 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>",
      "modelKey": "<modelKey>"
    },
    "name": "generate_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
promptYesWhat to generate.
qualityNoImage quality. Defaults to high.
modelKeyYesImage model key from list_models.
threadIdYesThread to generate in.
aspectRatioNoAspect ratio. Defaults to auto.
sourceFileIdsNoOptional input image file ids.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / modelKey / description
      Previous value: -"Optional model key from list_models; overrides quality-based routing."New value: +"Image model key from list_models."
    • changedInput schema / required
      Previous value: -[
      -  "threadId",
      -  "prompt"
      -]New value: +[
      +  "threadId",
      +  "prompt",
      +  "modelKey"
      +]
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint false, idempotentHint false), the description discloses the credit-spending cost, the async contract (returns immediately with a nodeId and status), and the required polling loop against get_generation_status. It also explains the @Name reference syntax for named references, which no structured field conveys.

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?

Five short sentences, front-loaded with the core action, then prerequisites, then cost, then optional inputs, then the async outcome. Every sentence carries distinct routing or behavioral information; none is 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?

With no output schema, the description compensates by describing the immediate return value (nodeId and status) and the polling path to completion. For an async, credit-spending, multi-dependency tool, 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 the baseline is 3, but the description adds provenance the schema lacks: which sibling supplies modelKey (list_models, an image model) and where sourceFileIds come from (upload_image or the library). It does not explain quality/aspectRatio defaults beyond what the schema already says, so it stops short of a 5.

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 ('Start generating a NEW image from a text prompt in a thread') and the capitalized NEW implicitly separates it from edit_image in the sibling set. An agent can distinguish it from generate_video, edit_image, and redo_generation without opening any 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?

Names concrete prerequisites and alternatives: create a thread with create_thread first, get modelKey from list_models, call estimate_cost if unsure about spend, and source files from upload_image or the library. It also routes follow-up behavior to get_generation_status rather than leaving the agent to guess.

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