Skip to main content
Glama

animation_create_timeline

Create animation timelines for UI/UX development using Framer Motion or GSAP libraries to sequence and coordinate multiple animations with precise timing and easing controls.

Instructions

Create animation timeline with Framer Motion or GSAP

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
libraryNoframer-motion
animationsYes

Implementation Reference

  • Main execution handler for animation_create_timeline tool. Validates input schema, generates timeline based on library (Framer Motion or GSAP), computes usage example and duration, returns structured JSON response.
    async createTimeline(args: any) {
      const params = AnimationTimelineSchema.parse(args);
      
      try {
        let timeline: any;
        
        if (params.library === 'framer-motion') {
          timeline = this.createFramerMotionTimeline(params.animations);
        } else {
          timeline = this.createGSAPTimeline(params.animations);
        }
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                library: params.library,
                timeline,
                usage: this.getUsageExample(params.library),
                totalDuration: this.calculateTotalDuration(params.animations)
              }, null, 2)
            }
          ]
        };
      } catch (error: any) {
        return {
          content: [
            {
              type: 'text',
              text: `Error creating animation timeline: ${error.message}`
            }
          ],
          isError: true
        };
      }
    }
  • Zod input validation schema used by the handler to parse and validate tool arguments.
    const AnimationTimelineSchema = z.object({
      library: z.enum(['framer-motion', 'gsap']).default('framer-motion'),
      animations: z.array(z.object({
        target: z.string(),
        properties: z.record(z.any()),
        duration: z.number().optional(),
        delay: z.number().optional(),
        easing: z.string().optional()
      }))
    });
  • src/index.ts:314-315 (registration)
    Tool dispatch registration in the central switch statement for CallToolRequest handling.
    case 'animation_create_timeline':
      return await this.animationTools.createTimeline(args);
  • src/index.ts:120-147 (registration)
    Tool metadata registration in ListToolsRequest handler, including name, description, and JSON schema matching the Zod schema.
    {
      name: 'animation_create_timeline',
      description: 'Create animation timeline with Framer Motion or GSAP',
      inputSchema: {
        type: 'object',
        properties: {
          library: { 
            type: 'string', 
            enum: ['framer-motion', 'gsap'],
            default: 'framer-motion'
          },
          animations: {
            type: 'array',
            items: {
              type: 'object',
              properties: {
                target: { type: 'string' },
                properties: { type: 'object' },
                duration: { type: 'number' },
                delay: { type: 'number' },
                easing: { type: 'string' }
              }
            }
          }
        },
        required: ['animations']
      }
    },
  • Key helper implementing Framer Motion timeline generation from animation parameters, creating variants, sequence, and sample code.
    private createFramerMotionTimeline(animations: any[]): any {
      const variants: any = {};
      const sequence: any[] = [];
      
      animations.forEach((anim, index) => {
        const variantName = `step${index}`;
        variants[variantName] = {
          ...anim.properties,
          transition: {
            duration: anim.duration || 0.3,
            delay: anim.delay || 0,
            ease: this.convertToFramerEasing(anim.easing)
          }
        };
        
        sequence.push({
          target: anim.target,
          variant: variantName,
          at: anim.delay || index * 0.1
        });
      });
    
      return {
        type: 'framer-motion',
        variants,
        sequence,
        code: this.generateFramerMotionCode(variants, sequence)
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states 'create' which implies a write/mutation operation, but doesn't disclose behavioral traits like whether this generates code, modifies files, requires specific permissions, has side effects, or what the output looks like. For a creation tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves.

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 extremely concise - a single sentence that gets straight to the point with zero wasted words. It's front-loaded with the core purpose and includes the key constraint (Framer Motion or GSAP). Every word earns its place in this minimal description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given a creation tool with 2 parameters (one complex array), 0% schema description coverage, no annotations, and no output schema, the description is inadequate. It doesn't explain what gets created (code? configuration file?), how to use the output, what the animations array should contain, or any behavioral context. For a tool that presumably generates animation timelines, this leaves too many unanswered questions.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It mentions 'Framer Motion or GSAP' which relates to the 'library' parameter with enum values, but doesn't explain what this choice means. It doesn't address the 'animations' array parameter at all - no explanation of what animations are, how they're structured, or what the nested properties mean. The description adds minimal value beyond what the bare schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'create' and the resource 'animation timeline', specifying it works with Framer Motion or GSAP. It distinguishes from some siblings like animation_preview or component_analyze by focusing on creation rather than previewing or analyzing. However, it doesn't explicitly differentiate from component_create or workflow tools, which might also involve creation tasks.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose Framer Motion vs. GSAP, nor does it explain when to use this versus sibling tools like animation_preview or component_create. There's no context about prerequisites, typical use cases, or exclusions.

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/willem4130/ui-ux-mcp-server'

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