Skip to main content
Glama

build_captions

Convert transcripts or SRT files into timed caption text layers in After Effects, with word wrapping and styling, or a single expression-driven layer that displays active segments by time.

Instructions

Turn a transcript into timed, wrapped, styled caption text layers — closes the whisper→captions loop. Provide segments ([{text,start,end}] in seconds) OR srt (raw SRT string; "HH:MM:SS,mmm --> HH:MM:SS,mmm" blocks are parsed). mode="layers" (default) creates one text layer per segment timed to [start,end]; mode="single" creates ONE layer with a source-text expression that shows the active segment by time from an embedded table. maxCharsPerLine word-wraps long lines (0 = no wrap). style = { font, fontSize, fillColor (hex or [r,g,b(,a)]), position [x,y], justification, box (true or [w,h] for paragraph/box text) } — captions default to centered near the lower third. Returns { mode, created, layers:[...] } (single mode also returns expression + expressionError).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "build_captions"
  }
}

Input Schema

NameRequiredDescriptionDefault
srtNoRaw SRT text (parsed instead of `segments`).
compNoComp: name (string), or { id: N } for duplicate-name-safe stable-id addressing. Defaults to active comp.
modeNolayers = one timed layer per segment; single = one expression-driven layer.layers
nameNoLayer name (single mode).
styleNo
instanceNoTarget a specific AE when more than one is connected (e.g. "2026", "2025", or a major like "26"). Omit when only one AE is open — see list_instances.
segmentsNoCaption segments in seconds.
maxCharsPerLineNoWord-wrap width in characters (0 = no wrap).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.3/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden and does substantial work: it discloses that layers are created, the return payload ({ mode, created, layers }), that single mode additionally returns expression + expressionError, and the default visual placement (centered near the lower third). It omits failure/partial-failure behavior and whether anything existing is modified.

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-loads the purpose, then input alternatives, then modes, then styling, then return value — a sensible ordering. It is dense and sentence-heavy (long em-dash chains), which costs a little readability, but nearly every clause conveys actionable information.

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 an 8-parameter tool with nested objects and no output schema, the description covers modes, input formats, styling defaults, and the return shape, which is enough to invoke it correctly. Gaps are minor: error/partial-creation behavior and how layer creation interacts with existing comp contents are unstated.

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 already 88%, so baseline is 3; the description goes beyond it by specifying the `segments` element shape ([{text,start,end}] in seconds), the accepted SRT block format, that maxCharsPerLine=0 means no wrap, and the full `style` field set with box semantics. Some parameters (name, comp) are left to 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?

States a specific verb and resource: 'Turn a transcript into timed, wrapped, styled caption text layers,' and adds the domain framing ('closes the whisper→captions loop'). An agent can immediately distinguish this from a generic add_text sibling because the output is explicitly per-segment timed caption layers.

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?

Gives clear input alternatives (provide `segments` OR `srt`), states which mode is the default and what each mode is for, and includes an operational hint for `instance` ('Omit when only one AE is open — see list_instances'). It does not explicitly say when to prefer this over add_text for non-caption text, so it stops short of full sibling routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools