Skip to main content
Glama

Capture Animation

capture_animation

Use this when you need to render a script's animation timeline to a video. Capture a kernelCAD script's animationView({...}) timeline to an MP4 (ffmpeg) or a PNG frame sequence, verifying the sampled poses for part interference. FILE ONLY: pass { file } (a .kcad.ts path) — there is no { code } mode, because the capture engine renders from a file on disk (its relative lib.fromSTEP imports resolve against the script directory). MP4 by default; pass { frames_dir } to write frame-0000.png... and skip ffmpeg entirely (mutually exclusive with output_path). Animation-pose interference verification runs by default (keyframe times + segment midpoints) BEFORE any browser/ffmpeg cost; { no_verify: true } skips it and { verify_every: n } additionally samples every n-th frame time. Pass { focus } or { hide } (arrays of feature ids or assembly part names, mutually exclusive) to isolate parts in the rendered frames — same semantics as kernelcad render --focus/--hide; visibility is render-only and does NOT affect the pose verification. Collisions DO NOT fail the call — the artifact is still written as evidence with ok: true; read verified: false + the collisions[] array. ENVIRONMENT REQUIREMENT (identical to kernelcad render): capture drives a headless browser against a running studio dev server reachable at http://localhost:5173 (or the VITE_PORT override); there is no bundled-static serving mode yet, so the same dev-server precondition applies in a production MCP install. Returns { ok, output_path, frame_count, duration_ms, fps, verified, verify_skipped?, collisions: [{ t_ms, a, b, volume_mm3 }], diagnostics }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fpsNoOverride the animationView record's fps.
fileYesPath to a .kcad.ts script with an animationView({...}) record. Required (no inline { code } mode).
hideNoHide matching feature ids / assembly part names in the rendered frames. Mutually exclusive with focus. Render-only; does not affect pose verification.
focusNoShow only matching feature ids / assembly part names in the rendered frames. Mutually exclusive with hide. Render-only; does not affect pose verification.
no_verifyNoSkip the animation-pose interference verification (default: verify on).
frames_dirNoPNG-sequence mode directory: write frame-0000.png... and skip ffmpeg. Mutually exclusive with output_path.
output_pathNoMP4 output path; default <scriptDir>/<basename>-animation.mp4. Mutually exclusive with frames_dir.
verify_everyNoAdditionally verify at every n-th frame time of the fps schedule (unioned with the keyframe sample set).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
fpsNo
errorNo
verifiedNoWhether pose-interference verification passed.
errorCodeNo
errorHintNo
collisionsNoColliding poses { t_ms, a, b, volume_mm3 }.
diagnosticsYes
duration_msNo
frame_countNo
output_pathNoWritten MP4 path (MP4 mode).
failure_kindNo
verify_skippedNo

TDQS

A4.7/5.0
Behavior5/5

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

Annotations provide limited info (readOnly=false, destructive=false). Description adds extensive behavior: collision verification, non-blocking collision handling (artifact still written), environment prereq, and return structure. Contradicts none.

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?

Description is long but each sentence adds value. Front-loaded with purpose. Some redundancy (environment requirement repeated) but overall efficient for the complexity.

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?

Covers all aspects: purpose, parameters, environment, return format, behavioral nuances. With output schema present, description still adds return structure details. Complete for an 8-parameter tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but description adds significant context: file parameter emphasizes no code mode, focus/hide explains mutual exclusivity and render-only semantics, frames_dir/output_path mutual exclusivity, verify_every union with keyframe sample set. Greatly enhances understanding.

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 clearly states 'Use this when you need to render a script's animation timeline to a video.' It specifies capture of animationView({...}) to MP4 or PNG frames, with a clear verb-resource relationship. It distinguishes from sibling tools like render_preview by focusing on animation capture.

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?

Provides explicit usage context: 'FILE ONLY: pass { file }' and 'no { code } mode.' Explains mutually exclusive options and environment requirements. Does not explicitly mention when not to use or alternatives, but the context is sufficiently clear.

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.

TDQS

A3.9/5.0
Disambiguation4/5

Tools are mostly distinct, with clear descriptions for each. However, there is some potential overlap between inspection tools like 'inspect' and 'mesh_summary', and between rendering tools 'render_preview' and 'get_latest_render', which could cause minor confusion.

Naming Consistency5/5

All tool names follow a consistent snake_case verb_noun pattern, making it predictable for an agent to infer functionality.

Tool Count2/5

44 tools is significantly higher than the typical well-scoped range of 3-15. While the domain is complex, the count feels excessive and could overwhelm an agent.

Completeness4/5

The tool set covers an extensive range of CAD operations including creation, inspection, rendering, export, and verification. Minor gaps exist, such as direct sketch editing tools, but overall it is comprehensive.