Skip to main content
Glama
junmer

LottieFiles MCP Server

get_popular_animations

Retrieve a list of trending Lottie animations using paging options to specify page number and items per page, ideal for discovering popular content on LottieFiles.

Instructions

Get a list of currently popular Lottie animations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of items per page
pageNoPage number, starting from 1

Implementation Reference

  • The main handler logic for the 'get_popular_animations' tool. It calls the LottieApiClient to fetch popular animations and formats the response as MCP tool content.
    case "get_popular_animations": const popular = await this.apiClient.getPopularAnimations( args?.page as number, args?.limit as number ); return { content: [ { type: "text", text: JSON.stringify( { count: popular.length, popular: popular, }, null, 2 ), }, ], };
  • Registration of the 'get_popular_animations' tool in the listTools method, including name, description, and input schema.
    { name: "get_popular_animations", description: "Get a list of currently popular Lottie animations.", inputSchema: { type: "object", properties: { page: { type: "integer", description: "Page number, starting from 1", minimum: 1, default: 1, }, limit: { type: "integer", description: "Number of items per page", minimum: 1, maximum: 100, default: 20, }, }, }, }, ],
  • Helper method in LottieApiClient that performs the actual API call to fetch popular animations from LottieFiles.
    async getPopularAnimations(page: number = 1, limit: number = 20) { try { const response = await this.axiosInstance.get( `${this.baseUrl}/iconscout/popular-animations-weekly?api=%26sort%3Dpopular`, { params: { page, limit, }, } ); return response.data.popularWeeklyData.data; } catch (error) { if (error instanceof Error) { throw new Error(`Failed to get popular animations: ${error.message}`); } throw new Error("Failed to get popular animations: Unknown error"); } }
  • TypeScript interface defining the input parameters for get_popular_animations.
    export interface GetPopularAnimationsParams { page?: number; limit?: number; }
  • TypeScript interface defining the output response for get_popular_animations.
    export interface GetPopularAnimationsResponse { animations: LottieAnimation[]; total: number; page: number; limit: number; }

Other Tools

Related 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