get_animation_details
Retrieve comprehensive details of a Lottie animation, including data, preview images, and tags, by providing its unique identifier using this tool on the LottieFiles MCP Server.
Instructions
Get detailed information about a specific Lottie animation, including animation data, preview images, and tags.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Unique identifier of the animation |
Implementation Reference
- src/handlers/ToolHandler.ts:110-122 (handler)Executes the get_animation_details tool by retrieving animation details using the LottieApiClient and returning them as a JSON-formatted text response.case "get_animation_details": const details = await this.apiClient.getAnimationById( args?.id as string ); return { content: [ { type: "text", text: JSON.stringify(details, null, 2), }, ], };
- src/handlers/ToolHandler.ts:42-56 (registration)Registers the get_animation_details tool in the listTools response, providing name, description, and input schema.{ name: "get_animation_details", description: "Get detailed information about a specific Lottie animation, including animation data, preview images, and tags.", inputSchema: { type: "object", properties: { id: { type: "string", description: "Unique identifier of the animation", }, }, required: ["id"], }, },
- src/api/LottieApiClient.ts:38-56 (helper)Supporting utility function that makes the HTTP request to the LottieFiles API to fetch animation details by ID.async getAnimationById(id: string) { try { const response = await this.axiosInstance.get( `${this.baseUrl}/animations/get-animation-data`, { params: { fileId: id, }, } ); return response.data; } catch (error) { if (error instanceof Error) { throw new Error(`Failed to get animation: ${error.message}`); } throw new Error("Failed to get animation: Unknown error"); } }