Skip to main content
Glama

Generate an image

generate_image

Generate one image, or edit one, with the selected project key. Unless the user names a model, pick from list_models type=image featured=true, the curated current ones; a model's params.image (detail=full) lists sizes, aspect ratios and qualities. Waits up to about 45 seconds: status completed carries url, a download link valid for 1 hour; status processing carries id for get_media_job. The result is deleted 24 hours after the job ends (1 hour on a zero-retention project) unless store is true. Normal costs and policy checks apply; usage.cost is the charge in USD. Requires runtime:call.

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

Input Schema

NameRequiredDescriptionDefault
idYesRuntime API key ID in this project; its secret is never returned
sizeNoPixel size WxH, for models that take one.
uuidYesProject UUID in the authorized organization
imageNoImage to edit (needs the image_edit capability). An https URL or a file_<id>.
modelYesImage model id from list_models type=image (featured=true for the curated ones).
storeNoAlso save the result to the project's files and return a reusable file_id. Default false: only a temporary link.
promptYesWhat the image shows.
qualityNoA tier from params.image.qualities.
parametersNoProvider settings, forwarded verbatim. Each model lists the keys it takes in params.image.parameters (list_models detail=full).
resolutionNoOutput tier such as 1k or 2k, for models that declare one.
aspect_ratioNoShape such as 16:9, from params.image.aspect_ratios.
reference_imagesNoImages the result draws on: subject, product or style. An https URL or a file_<id>.

Output Schema

NameRequiredDescriptionDefault
idYes
urlNo
nextNo
errorNo
usageNo
statusYes
file_idNo
mime_typeNo
expires_atNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Goes well beyond the annotations: discloses a ~45s wait, that completed results carry a URL valid 1 hour, that output is deleted 24h after the job (1h on zero-retention) unless store=true, and that usage.cost is billed in USD. The only slight gap is not saying what a failed/error status looks like, but overall this is rich operational context for a non-read-only, open-world tool.

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 action and the model-selection rule, then lifecycle and billing facts. Dense semicolon-chained clauses make it slightly hard to scan, but essentially every clause carries distinct information.

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 12-parameter generative tool with nested parameters, open-world access, and cost implications, the description covers discovery, timing, result lifetime, cost reporting, and the follow-up job tool. Output schema exists, yet the description's status/url/id notes are still useful and nothing an agent needs 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?

With 100% schema coverage the baseline is 3; the description still adds value by explaining how to derive legal values for model, size/aspect_ratio, quality, and parameters (via list_models detail=full, params.image). The store flag's retention consequence is spelled out in behavioral terms rather than just 'save the result'.

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+resource ('Generate one image, or edit one') and names the project-key scope, so the agent can distinguish it from generate_video, generate_speech, and call_model by resource alone.

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: 'Unless the user names a model, pick from list_models type=image featured=true', and tells the agent to inspect params.image (detail=full) for valid sizes/ratios/qualities. It also states the fallback path when status is processing (use get_media_job) and the auth prerequisite (runtime:call).

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