Skip to main content
Glama

Generate an AI video clip

generate_video_clip

Costs the model's per-second price for the chosen resolution and audio, charged only after confirm_cents matches the quote: starts one AI video clip.

Args: prompt: 1-4000 chars. model: a video model id from list_models. seconds: 1-60. Snapped to the nearest length the model allows (the durations listed by list_models; a tie takes the shorter); the answer says the real length. resolution: e.g. 720p (required: it changes the price). generate_audio: true or false (required: it changes the price). aspect: e.g. 9:16. first_frame_library_id: an image id to start the clip from (optional). reference_library_ids: up to 4 image ids (optional; each can add to the price). confirm_cents: the price the user agreed to (from tool_cost_estimate); 0 with quote_only. idempotency_key: unique per purchase; a retry with the same key never buys twice. Idempotency is keyed on (this token, this tool, idempotency_key), not on the arguments: reusing an idempotency_key with different arguments returns the first result. quote_only: true returns the price and buys nothing.

Returns: {ok, job_id, kind:'video', poll_after_s, model, duration, resolution, cents}: poll with wait_for_job; the finished clip lands in your Library A job that fails is refunded to the balance, but it still counts toward this token's daily limit until midnight UTC.

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>",
      "seconds": "<seconds>",
      "resolution": "<resolution>",
      "generate_audio": "<generate_audio>",
      "confirm_cents": "<confirm_cents>"
    },
    "name": "generate_video_clip"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelYes
aspectNo
promptYes
secondsYes
quote_onlyNotrue: return the price and buy nothing.
resolutionYes
confirm_centsYesThe price in cents the user agreed to, from tool_cost_estimate or a quote_only call. Pass 0 with quote_only.
generate_audioYes
idempotency_keyNoAny unique string per purchase; a retry with the same key never buys twice.
reference_library_idsNo
first_frame_library_idNoThe generationId from library_list.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false and destructiveHint=false; the description adds substantial behavior beyond that — charging occurs only when confirm_cents matches the quote, failed jobs are refunded but still consume the daily limit until midnight UTC, durations are snapped to the nearest allowed length with ties going shorter, and idempotency is keyed on (token, tool, key) so argument changes return the first result. These are exactly the financial and retry semantics an agent cannot infer from 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?

The Args/Returns structure is scannable and every line carries weight, with no filler. The opening sentence is awkwardly constructed (price clause before the actual verb) and partly duplicates the Args list, slightly delaying the front-loaded statement of what the tool does.

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, paid, non-idempotent-by-default mutation with no output schema, the description supplies the missing return shape (ok, job_id, poll_after_s, duration, cents), the polling next step (wait_for_job), refund behavior, and the idempotency contract. Nothing an agent needs to call this safely and correctly is absent.

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 only 36% across 11 parameters, so the description must compensate, and it largely does: every parameter gets a semantic note (prompt length, seconds snapping rule, resolution/audio affecting price, reference ids adding cost, confirm_cents provenance, quote_only=0 convention). The aspect parameter ('e.g. 9:16') is thin and model/resolution valid values are deferred to list_models, but overall meaning is added well beyond the schema.

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 names a specific verb and resource ('starts one AI video clip') and embeds the distinguishing economics (per-second pricing by resolution and audio), which separates it from the image/music/voiceover generation siblings without needing their schemas. An agent can identify the tool's job immediately.

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?

It routes the agent into the correct workflow: get a price via tool_cost_estimate, pass it as confirm_cents, or use quote_only to price without buying, and use list_models for valid model ids. It stops short of explicit exclusions (e.g. when to prefer generate_image or ai_short_create), so it's clear context rather than full when/when-not guidance.

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