validate_animation
Validate animation code against design system primitives and personality constraints.
Reference
Parameters
- Name
code- Type
- string · required
- Description
The animation CSS or JS code to validate
- Name
personality_slug- Type
- string · optional
- Description
Check against personality constraints
- Name
design_system_id- Type
- string · optional
- Description
Scope validation to a design system (uuid)
- Name
strict- Type
- boolean · optional
- Description
Whether to treat warnings as errors (default:
false)
Returns
{
valid Boolean indicating if code passes validation
violations Array of { type, severity, message, line?, suggestion }
score Quality score 0-100
sanctioned_alternatives Suggested primitive replacements for raw animations
}
Description
Validate animation code against design system primitives and personality constraints.
Checks animation CSS/JS code for:
- Use of sanctioned primitives vs raw @keyframes
- Correct token usage for durations and easings
- Personality constraint compliance
- Reduced motion handling
- Performance concerns (will-change, compositor-only properties)
Parameters:
- code: The animation CSS or JS code to validate
- personality_slug (optional): Check against personality constraints
- design_system_id (optional): Scope validation to a design system
- strict (optional): Whether to treat warnings as errors
Source
Defined in packages/mcp/src/tools.ts.
The request handler lives alongside its registration in packages/mcp/src/tools/.
Last reviewed by @jschuyler