Skip to main content
Glama

Validate a MotionSpec (trust boundary)

motion_validate
Read-only

Validate a MotionSpec before compiling: check schema compliance, allowed primitives, parameter bounds, and injection risks. Get precise errors plus WCAG 2.2.2 reduced-motion warnings, with ok=false on failure.

Instructions

Checks a MotionSpec against the schema, the primitive allow-list, parameter bounds and injection rules. Fail-closed: returns ok=false with precise errors. Returns {ok, errors, warnings, deprecations, catalogVersion}. IMPORTANT: warnings[] carries the WCAG 2.2.2 / reduced-motion findings and can be non-empty while ok=true — a spec that compiles is not automatically accessible. Use to pre-check a spec before compiling.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
specYesThe MotionSpec JSON object

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

The description goes well beyond the readOnlyHint and openWorldHint annotations by disclosing fail-closed behavior, the exact return shape, and the non-obvious fact that warnings can be non-empty while ok=true. It also explains the accessibility implication, which is critical for correct agent behavior.

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 compact and front-loaded, with the core validation behavior stated first, followed by the return shape and the critical warning caveat. Every sentence earns its place, and the formatting highlights the most important behavioral nuance.

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 a single-parameter, read-only validation tool with no output schema, the description fully covers what the tool does, when to use it, what it returns, and the key failure and warning semantics. An agent has sufficient information to select and invoke it correctly without additional context.

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 for the single parameter is 100%, so the baseline is 3. The description adds meaningful semantics by clarifying that the spec parameter is a MotionSpec and by enumerating the validation dimensions applied to it, such as the primitive allow-list and injection rules, which the schema alone does not convey.

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 ('Checks') and a specific resource ('MotionSpec'), then enumerates exactly what it validates against: schema, primitive allow-list, parameter bounds, and injection rules. It clearly distinguishes itself from the sibling motion_compile by positioning validation as a pre-compile safety check.

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 explicitly says 'Use to pre-check a spec before compiling,' which gives clear guidance on when to call this tool. It also explains the important warning behavior so an agent knows this is the right tool for accessibility checks before compilation, though it does not explicitly name or exclude alternatives beyond the pre-compile framing.

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