Skip to main content
Glama

Preview Clip

preview_clip

Render a scoped, cheap MOTION preview — ONLY body.fromSec→body.toSec of the composition (max 60s) at preview quality (capped resolution, lighter encode) through the real render pipeline. THE way to judge motion — a cut, a transition, a component's animation — at full fidelity BEFORE paying for a full render (a still cannot show motion; a full render costs the export). ASYNC: returns a render job; wait_job(kind="render", id=renderId) or a render.completed webhook for the URL. Meters the capture feature, never an exports credit.

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": {
      "projectId": "<projectId>",
      "body": "<body>"
    },
    "name": "preview_clip"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesPOST /projects/:id/preview-clip body.
commandIdNoRetry identity. A call repeated with the same commandId returns the first result instead of acting twice.
projectIdYesprojectId (path).

Output Schema

NameRequiredDescriptionDefault
idNo
errorNoHuman-readable failure message. Pair with `errorCode` for a stable, machine-readable code an agent runner can branch on.
engineNoThe render engine the row was minted for. Null on rows minted before the engine was recorded.
formatNoThe resolved output format the render was encoded at (aspectRatio, fps, resolution): the frozen composition's, after any create-time scale override. Null on legacy rows.
statusNo
listUsdNoA2 money stamp: the metered event's LIST price (USD), stamped at the success terminal (exports for deliverable renders, compose_capture for A8 previews). A plan allowance may zero the actual invoice line — this is the list price, never a Stripe charge. Absent while running, on failure, and for x402 orgs (on-chain receipts). Mirrors the get_usage ledger.
previewNoThe scoped preview window when this is a preview_clip render; null for a full deliverable.
categoryNoFailure taxonomy when status is `error`; null otherwise. `authoring` = deterministic defect in YOUR composition/request — fix it, retrying is futile; `transient` = temporary pipeline/infra failure — safe to retry_render; `internal` = unexpected server fault — retry once then escalate. Mirrors the render.failed webhook's `category`.
progressNoNon-terminal render progress; phase is one of the worker's emitted stages.
warningsNoNon-fatal advisories surfaced at render-CREATE (omitted when none, and on GET — create-time only).
createdAtNo
errorCodeNoStable, machine-readable error code (e.g. `render_pipeline_unavailable`, `render_route_missing`, `render_pipeline_failed`). Null when status is not `error` or unavailable for an older render.
outputUrlNo
retryableNoWhether re-attempting the SAME render can succeed (status `error`); null otherwise. true → call retry_render. false → deterministic (category authoring/internal); fix the composition first — retry_render alone reproduces it. Mirrors the render.failed webhook's `retryable`.
updatedAtNoISO-8601 timestamp of the render's most recent progress update. Compute staleness = now − updatedAt to distinguish a wedged render from a slow one and decide whether to wait, cancel, or retry.
completedAtNoISO-8601 instant the render reached its terminal status (complete, error or cancelled); null while it runs. Pair with createdAt for the wall time.
errorDetailsNoStructured failure context — `{ targetUrl?, upstreamStatus?, upstreamCode?, attemptedAt? }`. Surfaced so agent runners can distinguish operator-config issues from upstream-down vs route-missing without parsing `error`.
compositionIdNoThe composition this render froze at create time (the project's active one, or the compositionId the request named). Null on renders minted before this was recorded.
outputExpiresAtNo
outputDurationSecNoThe output's length in seconds (the composition timeline's, or the preview window's), as billed. Null on legacy rows.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed17 schema fields changed
    • addedInput schema / $defs
      Added value: +{
      +  "__schema0": {
      +    "description": "Window start, seconds into the composition.",
      +    "minimum": 0,
      +    "type": "number"
      +  },
      +  "__schema1": {
      +    "description": "Window end (exclusive), seconds.",
      +    "exclusiveMinimum": 0,
      +    "type": "number"
      +  },
      +  "__schema2": {
      +    "description": "Target a specific composition; defaults to the project's active composition.",
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "__schema3": {
      +    "maxLength": 128,
      +    "minLength": 1,
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / body / properties / compositionId / $ref
      Added value: +"#/$defs/__schema2"
    • removedInput schema / properties / body / properties / compositionId / description
      Removed value: -"Target a specific composition; defaults to the project's active composition."
    • removedInput schema / properties / body / properties / compositionId / minLength
      Removed value: -1
    • removedInput schema / properties / body / properties / compositionId / type
      Removed value: -"string"
    • addedInput schema / properties / body / properties / fromSec / $ref
      Added value: +"#/$defs/__schema0"
    • removedInput schema / properties / body / properties / fromSec / description
      Removed value: -"Window start, seconds into the composition."
    • removedInput schema / properties / body / properties / fromSec / minimum
      Removed value: -0
    • removedInput schema / properties / body / properties / fromSec / type
      Removed value: -"number"
    • addedInput schema / properties / body / properties / toSec / $ref
      Added value: +"#/$defs/__schema1"
    • removedInput schema / properties / body / properties / toSec / description
      Removed value: -"Window end (exclusive), seconds."
    • removedInput schema / properties / body / properties / toSec / exclusiveMinimum
      Removed value: -0
    • removedInput schema / properties / body / properties / toSec / type
      Removed value: -"number"
    • addedInput schema / properties / commandId / $ref
      Added value: +"#/$defs/__schema3"
    • removedInput schema / properties / commandId / maxLength
      Removed value: -128
    • removedInput schema / properties / commandId / minLength
      Removed value: -1
    • removedInput schema / properties / commandId / type
      Removed value: -"string"
  2. Changed1 schema field changed
    • addedInput schema / properties / commandId
      Added value: +{
      +  "description": "Retry identity. A call repeated with the same commandId returns the first result instead of acting twice.",
      +  "maxLength": 128,
      +  "minLength": 1,
      +  "type": "string"
      +}
  3. Changed6 schema fields changed
    • addedOutput schema / properties / completedAt
      Added value: +{
      +  "description": "ISO-8601 instant the render reached its terminal status (complete, error or cancelled); null while it runs. Pair with createdAt for the wall time.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / compositionId
      Added value: +{
      +  "description": "The composition this render froze at create time (the project's active one, or the compositionId the request named). Null on renders minted before this was recorded.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / engine
      Added value: +{
      +  "description": "The render engine the row was minted for. Null on rows minted before the engine was recorded."
      +}
    • addedOutput schema / properties / format
      Added value: +{
      +  "description": "The resolved output format the render was encoded at (aspectRatio, fps, resolution): the frozen composition's, after any create-time scale override. Null on legacy rows."
      +}
    • addedOutput schema / properties / outputDurationSec
      Added value: +{
      +  "description": "The output's length in seconds (the composition timeline's, or the preview window's), as billed. Null on legacy rows.",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / preview
      Added value: +{
      +  "description": "The scoped preview window when this is a preview_clip render; null for a full deliverable."
      +}
  4. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond annotations, it discloses the async contract (returns a render job; wait via wait_job(kind="render", id=renderId) or a render.completed webhook), the billing nuance ('meters the capture feature, never an exports credit'), and quality limits (max 60s, capped resolution, lighter encode). These are exactly the operational details annotations cannot express.

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 scope and purpose, then alternatives, then async/metering behavior — a sensible order with no filler sentences. The emphatic caps and em-dash phrasing make it denser than strictly necessary, but every clause carries 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 an async job-creating tool with an output schema and annotations already present, this covers the remaining gaps: how to collect the result, how it is billed, what quality/limits to expect, and when not to use it. Nothing an agent needs to invoke 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 coverage is 100%, so the baseline is 3, but the description adds a constraint not present in the schema: the 60-second maximum on the fromSec→toSec window. It doesn't explain compositionId or commandId, but the schema describes those adequately.

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 and resource ('Render a scoped, cheap MOTION preview') and immediately narrows the scope to body.fromSec→body.toSec. It explicitly distinguishes itself from the two nearest alternatives: preview_frame ('a still cannot show motion') and create_render ('a full render costs the export').

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 gives an explicit when-to-use rule ('THE way to judge motion... at full fidelity BEFORE paying for a full render') and names the conditions that select the alternatives (still vs. full export). An agent can pick the correct tool without opening any schema.

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.