Skip to main content
Glama

Generate video

generate_video

Create a short video clip from a written description. Video is the expensive path: a clip typically costs 50-150 credits against the workspace's Masonry balance (list_models has exact per-model prices) and takes about 1-5 minutes. Waits for the clip and returns it in the conversation; if it is still rendering when the wait ends, the reply carries a job_id: the job keeps running and check_generation returns its result. Starting the same job again makes and bills a second one. For requests longer than 10 seconds (including 1 min), or any multi-scene script, generate scenes as separate clips, keep characters consistent with the same reference images, then call combine_clips with their job_ids to deliver one video. For spoken dialogue or voiceover, call generation_guidance first: only some models can speak. Call list_skills and pass skill_slug when the request matches a Masonry video skill; write prompt from the user's request.

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>"
    },
    "name": "generate_video"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoOptional model key (see list_models). Defaults to the workspace's default video model, or the first recommended one that takes the references given.
promptYesText prompt describing the video to generate.
silentNoSet true for a clip with no sound of its own, e.g. when a voiceover or music goes on in combine_clips. Models without an audio switch ignore it; combine_clips can mute any clip.
voicesNoOptional voices for the people who speak, up to 3, for models with voice_ids (Kling 4.0): each a Kling voice id or an add_media media_id of a recording of one person speaking 5-30 seconds. A recording is meant to be the user's own voice, or that of someone who has agreed to it. Name them @Voice1, @Voice2 in the prompt, in order.
optionsNoOptional model-specific settings by name, for example resolution set to 1080p. Only settings the chosen model has; a wrong name is refused with the list it accepts.
elementsNoOptional people, characters or products to keep identical through the clip, for models list_models shows with elements (Kling 4.0): each a front photo plus 1-3 other angles. Name them @Element1, @Element2 in the prompt, in order. Omit model and Masonry picks one that takes them.
charactersNoWorkspace characters by name (see list_characters). Each one's sheet is sent as a reference image, after reference_image_urls, so the same person or mascot appears. For the closest likeness, make a still with generate_image (characters) and animate_image it instead. Meant for a character the user named. With skill_slug, a name from that template's cast (read_skill lists it) is added to the workspace on first use, free.
skill_slugNoOptional Masonry skill slug from list_skills. Uses the selected skill for provenance and model routing only; skill text is guidance, and the prompt describes the user's request.
aspect_ratioNoOptional aspect ratio. Any ratio the chosen model supports (list_models shows each model's ratios), e.g. 4:5, 16:9, 9:16, or an exact WIDTHxHEIGHT on models that accept custom sizes. An unsupported ratio is refused with the model's supported list; nothing is silently substituted. Omit for the model's default.
duration_secondsNoOptional clip duration in seconds (model-specific).
reference_image_urlsNoOptional photos of a real person or product to keep identical in the clip: direct https image URLs or masonry:// references (masonry://generations/<job_id> for an image made earlier). Only models that take reference images use them (list_models marks them refs, with their limit); any other model refuses the call. Refer to them in the prompt as @Image1, @Image2 in order.

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?

Beyond the annotations (readOnlyHint=false, openWorldHint=true, idempotentHint=false), the description discloses cost (50-150 credits against the Masonry balance), latency (1-5 minutes), that it waits for the clip and falls back to a job_id that keeps rendering, and that re-starting the same job is billed again. That last point usefully reinforces non-idempotency. A 4 rather than 5 because failure modes on the billing/refund side are left to list_models.

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 dense but front-loaded: the purpose sentence comes first, then cost/time, then return behavior, then alternatives. Every sentence carries operational information, though the middle paragraph packs several distinct directives together and could be split for faster scanning.

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 an 11-parameter, nested-object, non-idempotent generation tool with no output schema, the description covers what is returned (the clip in conversation or a job_id), how to retrieve a pending result, cost and duration expectations, and which sibling to use for long or multi-scene requests. Nothing needed 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 description coverage is 100%, so the baseline is 3, but the description adds real routing meaning: write prompt from the user's request, use skill_slug only for provenance and model routing, split long durations into separate clips, and constrain characters/voices to models that accept them. It does not restate the @Voice1/@Element1 naming rules, which the schema already covers.

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 opening sentence gives a specific verb and resource ('Create a short video clip from a written description') and the cost/split guidance implicitly separates it from image and stitching siblings such as generate_image and combine_clips. An agent can tell what this tool produces without opening the 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?

It names alternatives and the conditions that select them: generation_guidance first for spoken dialogue, list_skills/skill_slug when a Masonry video skill matches, combine_clips with job_ids for requests over 10 seconds or multi-scene scripts, and check_generation when a job_id is returned. Preconditions (reference images for characters, model support for voices/elements) are stated explicitly.

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