Skip to main content
Glama

Compile a MotionSpec to GSAP/CSS

motion_compile
Read-onlyIdempotent

Validates and compiles MotionSpecs into production-ready GSAP JavaScript and CSS, with enforced reduced-motion fallbacks and performance budget reports.

Instructions

Validates (fail-closed) and deterministically compiles a MotionSpec into production-ready vanilla-GSAP JavaScript and CSS, with enforced prefers-reduced-motion fallbacks and a performance-budget report. Same spec always yields identical code. Returns {ok, js, css, report} or {ok:false, errors}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
specYesThe MotionSpec JSON object
specNameNoOptional name used in the artifact header
Behavior5/5

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

The description adds significant context beyond annotations: it discloses deterministic compilation (idempotent), fail-closed validation, enforcement of prefers-reduced-motion, and a performance report. Annotations already indicate idempotentHint and readOnlyHint, but the description elaborates with concrete behaviors and outputs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the key action and outputs. Every sentence adds value: the first covers validation, compilation, and features; the second covers determinism and return shape. No fluff.

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?

Despite no output schema, the description fully explains the return structure ({ok, js, css, report} or errors). It covers input, process, and output comprehensively for a compilation tool. Nested objects are described as MotionSpec JSON, and the behavioral details are complete.

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% with basic descriptions. The description enhances understanding by explaining that the spec is validated and compiled deterministically, and that specName is for artifact headers. This adds semantic value beyond the schema's minimal descriptions.

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 that the tool validates (fail-closed) and compiles a MotionSpec into GSAP/CSS with deterministic output, specifying verb, resource, and output format. It distinguishes itself from siblings by focusing on compilation, while others like motion_validate and motion_audit handle different operations.

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?

The description implies when to use the tool (e.g., for production-ready code with reduced-motion fallbacks) but does not explicitly contrast with siblings or state when not to use it. The context is clear enough for an agent to infer, but lacks explicit exclusions or alternative recommendations.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MasterPlayspots/motionspec'

If you have feedback or need assistance with the MCP directory API, please join our Discord server