Skip to main content
Glama

Generate

generate

Run a capability (see list_capabilities). model is optional; the capability's first available model, in list_capabilities order, is used. estimate_cost shows which model that is and its price. inputs maps slot names to asset ids, e.g. {"images": [id1, id2]} for image.edit or {"start_frame": [id]} for video.generate; ids come from upload_asset or earlier jobs' outputs. A public https URL or a data: URI also works in place of an id; the API stores it as an asset at submit. Credits are charged per job; the response has credits_estimate. With wait=false (default) it returns at once with request_id; with wait=true the API holds the submit until the job finishes (up to 60s, then polling continues) for up to timeout_s (max 600) and returns the final status, whose outputs list the produced asset ids. Images take seconds to a minute; video takes minutes, so prefer wait=false then wait_for_job. workflow_run_id/step_key tag the job as a step of a workflow. item (an item id, slug or @slug in project; see list_items) records the output as a new take of that item. The take is not starred automatically: review it with list_takes and keep it with star_take. Image models only: num_outputs (1 to the model's max_outputs, at most 4) makes several images in one job, priced per image and charged only for images delivered; output_format is png (default), jpeg or webp, and output_quality (1-100) sets jpeg/webp encoding quality. loras applies up to three platform LoRAs (styles, looks) by slug, optionally with a strength as "slug:0.8" (default is the LoRA's own). Only models with a lora_family accept them, and only LoRAs of that family; list_loras shows what fits a model. Each LoRA adds 15% to the price and its trigger words to the prompt.

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

Input Schema

NameRequiredDescriptionDefault
itemNo
seedNo
waitNo
lorasNo
modelNo
inputsNo
promptNo
projectNo
qualityNo
step_keyNo
timeout_sNo
capabilityYes
duration_sNo
resolutionNo
num_outputsNo
aspect_ratioNo
output_formatNo
output_qualityNo
workflow_run_idNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only declare non-read-only, open-world, non-destructive; the description adds the substantive behavior: credits are charged per job, the response carries credits_estimate, wait=true blocks up to 60s then continues polling within timeout_s (max 600), takes are not auto-starred, and each LoRA adds 15% to price plus trigger words. It stops short of saying whether a submitted job can be cancelled (cancel_job exists) or what a partial-failure charge looks like.

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?

Every sentence carries information — pricing, timing, id sourcing, LoRA math — with no filler. It is still a dense wall of text that front-loads the optional `model` nuance ahead of the tool's core purpose, making it slower to scan than necessary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 19-parameter generation tool with an output schema (so return values needn't be spelled out), the description covers cost, latency, id provenance, async patterns and take semantics. It leaves several media-shaping parameters (seed, resolution, aspect_ratio, duration_s) undefined, which is the main remaining gap.

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 0% schema coverage across 19 parameters the description must carry the load, and it explains most non-obvious ones: inputs slot mapping with id/URL/data-URI alternatives, model defaulting, wait/timeout_s interaction, workflow_run_id/step_key tagging, item take creation, num_outputs with per-image pricing and the max_outputs cap, output_format/output_quality, and loras syntax with 'slug:0.8' strengths. Unaddressed are seed, resolution, aspect_ratio, duration_s, quality and project, which an agent must guess at.

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 concrete action (run a capability) plus the resource it produces, and anchors it with worked examples ('{"images": [id1, id2]} for image.edit', '{"start_frame": [id]} for video.generate'). It distinguishes itself from list_capabilities, estimate_cost, upload_asset, list_takes and star_take by naming each and what it is for.

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?

Explicit routing: consult list_capabilities for capabilities, estimate_cost to learn which model and price applies, prefer wait=false then wait_for_job for long video jobs, review takes with list_takes and keep with star_take, and check list_loras to see what fits a model. Both when-to-use and which-alternative are stated.

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