Skip to main content
Glama

Generate an image, video, speech, music or 3D file

generate

Runs any media model id from list_media_models with its settings (see media_model) through POST /v1/generations, waits up to wait_seconds for the files, and returns the generation: a link per file (kept 30 days), a finished image inline, and the charge. A video that is still running when the wait ends is returned as it stands; call generation with its id to keep waiting. Charged to the key in the MCP request's Authorization header when the model accepts the task; a failed generation is refunded in full. To go from an image to a video or an edit, pass the image's URL in image_urls.

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": {
      "model": "<model>",
      "input": "<input>"
    },
    "name": "generate"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputYesThe model's settings, as media_model lists them under params: prompt, size or aspect_ratio, resolution, duration, image_urls, text, voice... A setting left out takes the model's default.
modelYesA media model id from list_media_models.
previewNoDefault true: a finished image comes back inline as image content besides its link.
wait_secondsNoSeconds to wait for the files before answering with the generation as it stands, 0 to 120. Images usually finish inside the default 60; a video takes minutes, so follow up with generation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations (which only say non-readonly, open-world, non-idempotent), the description discloses billing (charged to the Authorization-header key on acceptance, full refund on failure), artifact retention (links kept 30 days), and partial-result semantics for long-running video. These are the operationally important traits an agent cannot get from 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?

It is a single dense paragraph front-loaded with the core action and return shape, then billing, then the image-input tip. Every clause carries information, but the sentences are long and multi-clause; light breaking or bolding of the waiting/billing behavior would improve scanning without cutting content.

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?

There is no output schema, so the description carries the return-value burden and does so: a link per file with 30-day retention, an inline finished image under preview, and the charge. Combined with the schema's full parameter documentation, an agent has everything needed to call it and interpret the result.

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, but the prose adds real meaning: wait_seconds is contextualized (images finish within the default 60, video takes minutes, use generation to continue) and image_urls is explained as the image-to-video/edit path. The nested input object's parameter names are pointed at media_model's params rather than duplicated, which is useful routing rather than a gap.

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 ('Runs any media model id') plus the resource scope ('media model id from list_media_models'), the transport endpoint, and the return shape. It is clearly separable from siblings: list_media_models/media_model supply the id and settings, generation polls an unfinished job, and this tool performs the initial run.

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?

It explicitly routes the agent to the right siblings: use list_media_models for ids, media_model for settings, generation with an id to keep waiting, and image_urls to go from an image to video or an edit. The 'a video that is still running when the wait ends' clause gives a concrete condition for the follow-up path rather than leaving it to inference.

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.