Skip to main content
Glama
junmer

LottieFiles MCP Server

get_animation_details

Retrieve comprehensive data about a Lottie animation, including animation details, preview images, and associated tags, by providing its unique identifier.

Instructions

Get detailed information about a specific Lottie animation, including animation data, preview images, and tags.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesUnique identifier of the animation

Implementation Reference

  • Registration of the 'get_animation_details' tool in the listTools method, including its 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"],
      },
    },
  • The handler case in callTool that executes the get_animation_details tool by calling the API client and returning the details as JSON.
    case "get_animation_details":
      const details = await this.apiClient.getAnimationById(
        args?.id as string
      );
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(details, null, 2),
          },
        ],
      };
  • Core helper method in LottieApiClient that fetches animation details from the LottieFiles API using the provided animation 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");
      }
    }

Tool Definition Quality

Score is being calculated. Check back soon.

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/junmer/mcp-server-lottiefiles'

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