Skip to main content
Glama

configureAnimationAction

Configure animation actions for 3D objects in Spline scenes by setting animation type, duration, easing, and parameters to create rotate, move, scale, or fade effects.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sceneIdYesScene ID
actionIdYesAction ID
objectIdYesObject ID to animate
animationTypeYesAnimation type
durationYesAnimation duration (ms)
easingNoAnimation easing
parametersYesAnimation-specific parameters

Implementation Reference

  • The main handler function that implements the tool logic: constructs animation parameters and sends a PUT request to update the action on the Spline server.
    async ({ sceneId, actionId, objectId, animationType, duration, easing, parameters }) => { try { const actionParameters = { objectId, animationType, duration, ...(easing && { easing }), ...parameters, }; await apiClient.request('PUT', `/scenes/${sceneId}/actions/${actionId}`, { type: 'animation', parameters: actionParameters }); return { content: [ { type: 'text', text: `Animation action ${actionId} configured successfully` } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error configuring animation action: ${error.message}` } ], isError: true }; } }
  • Zod schema defining input parameters for the configureAnimationAction tool.
    sceneId: z.string().min(1).describe('Scene ID'), actionId: z.string().min(1).describe('Action ID'), objectId: z.string().min(1).describe('Object ID to animate'), animationType: z.enum(['rotate', 'move', 'scale', 'fade']).describe('Animation type'), duration: z.number().min(0).describe('Animation duration (ms)'), easing: z.enum(['linear', 'easeIn', 'easeOut', 'easeInOut']).optional() .describe('Animation easing'), parameters: z.record(z.any()).describe('Animation-specific parameters'), },
  • The server.tool() call that registers the configureAnimationAction tool with its schema and handler.
    'configureAnimationAction', { sceneId: z.string().min(1).describe('Scene ID'), actionId: z.string().min(1).describe('Action ID'), objectId: z.string().min(1).describe('Object ID to animate'), animationType: z.enum(['rotate', 'move', 'scale', 'fade']).describe('Animation type'), duration: z.number().min(0).describe('Animation duration (ms)'), easing: z.enum(['linear', 'easeIn', 'easeOut', 'easeInOut']).optional() .describe('Animation easing'), parameters: z.record(z.any()).describe('Animation-specific parameters'), }, async ({ sceneId, actionId, objectId, animationType, duration, easing, parameters }) => { try { const actionParameters = { objectId, animationType, duration, ...(easing && { easing }), ...parameters, }; await apiClient.request('PUT', `/scenes/${sceneId}/actions/${actionId}`, { type: 'animation', parameters: actionParameters }); return { content: [ { type: 'text', text: `Animation action ${actionId} configured successfully` } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error configuring animation action: ${error.message}` } ], isError: true }; } } );

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/aydinfer/spline-mcp-server'

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