Skip to main content
Glama

generate_image

Starts a local image-generation job from a prompt and model, validates the request immediately, and returns a job ID for polling status.

Instructions

Start one image generation job and return its job_id at once.

    The request is validated first, so errors come back immediately. Then call
    get_job_status with wait_seconds=45 until the job ends.
    

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

Input Schema

NameRequiredDescriptionDefault
seedNoSame seed = same image.
modelYesA model id from list_models.
stepsNoDefault: model default.
widthNoPixels. Default: model default, or the shape of the first reference image when reference_images is set and no size is given.
heightNoPixels. Default: model default.
promptYesWhat the image shows, in natural language.
cfg_scaleNoGuidance; 1.0 means no CFG. Default: model default.
output_pathNoPNG path or directory. Default: <project>/generated-images/.
negative_promptNoOnly for models with supports_negative_prompt.
reference_imagesNoPaths of input images (png, jpg, webp, bmp), for models with 'reference' or 'edit'. Relative paths start at the project directory. Describe the change in the prompt.

Output Schema

NameRequiredDescriptionDefault
stateYes
job_idYes
settingsYes
warningsYes
next_stepYes
queue_positionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only declare openWorldHint=false and destructiveHint=false, so the description carries most of the behavioral burden and does it well: it discloses that the call is non-blocking, that validation happens before the job starts so errors surface immediately, and that progress must be polled. It stops short of things like cost, rate limits, or what happens to an existing file at output_path.

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?

Effectively two sentences, front-loaded with the action and immediate return, then the next-step instruction. The stray indentation adds no meaning but costs nothing; every sentence earns its place.

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?

An output schema exists, so return values need not be explained, and the schema fully documents the 10 parameters. The description fills the remaining critical gap for a complex async tool: the start-then-poll workflow and the fact that failures are reported before job creation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, covering every one of the 10 parameters including model-dependent notes for negative_prompt, reference_images, and dimension defaults. The description adds no parameter-level meaning beyond the schema, so the baseline 3 applies.

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 one image generation job') plus the exact return of the synchronous phase ('return its job_id at once'). This makes clear it is an async kick-off rather than a blocking generate, which is exactly the distinction needed against siblings like get_job_result.

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?

Gives an explicit follow-up recipe: 'call get_job_status with wait_seconds=45 until the job ends', so the agent knows the next tool and the polling cadence. It does not explicitly name when-not to use it (e.g. versus a blocking variant if one existed), but the workflow guidance is concrete and actionable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.