Skip to main content
Glama
junmer

LottieFiles MCP Server

get_popular_animations

Retrieve trending Lottie animations to discover popular motion graphics for your projects.

Instructions

Get a list of currently popular Lottie animations.

Input Schema

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

Implementation Reference

  • Executes the 'get_popular_animations' MCP tool by calling the API client to fetch popular animations and returning a formatted JSON response.
    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
            ),
          },
        ],
      };
  • Performs the actual HTTP API call to the LottieFiles endpoint to retrieve popular animations data.
    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");
      }
    }
  • Registers the 'get_popular_animations' tool in the MCP listTools method, defining its name, description, and input JSON 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,
          },
        },
      },
    },
  • TypeScript interface defining the input parameters for getPopularAnimations.
    export interface GetPopularAnimationsParams {
      page?: number;
      limit?: number;
    }
  • TypeScript interface defining the response structure for getPopularAnimations.
    export interface GetPopularAnimationsResponse {
      animations: LottieAnimation[];
      total: number;
      page: number;
      limit: number;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions retrieving a list but doesn't describe key behaviors such as how 'popular' is determined (e.g., by views, likes, recency), whether the list is cached or real-time, any rate limits, authentication needs, or what the return format looks like (e.g., JSON array of animation objects). For a read operation with no annotation coverage, this leaves significant gaps in understanding the tool's behavior.

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 a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded with the core action ('Get a list') and resource ('currently popular Lottie animations'), making it easy to parse. There's no redundancy or fluff, and every part of the sentence contributes essential information.

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 the tool's complexity (a read operation with pagination), lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like how popularity is defined, potential rate limits, or the structure of returned data. While the schema handles parameters well, the overall context for effective use by an AI agent is insufficient, as key operational details are missing.

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

Parameters3/5

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

The input schema has 100% description coverage, with clear documentation for 'page' and 'limit' parameters including defaults and constraints. The description doesn't add any semantic details beyond what the schema provides, such as explaining how pagination affects the 'popular' list or typical use cases for adjusting limits. Since schema coverage is high, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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 tool's purpose with a specific verb ('Get') and resource ('list of currently popular Lottie animations'). It distinguishes from the sibling 'get_animation_details' by focusing on popular animations rather than details, and from 'search_animations' by retrieving a curated list rather than performing a search. However, it doesn't explicitly mention the pagination aspect, which is part of the functionality.

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

Usage Guidelines3/5

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

The description implies usage for retrieving popular animations, suggesting it should be used when a user wants trending or curated content rather than specific details or custom searches. It doesn't provide explicit when-not-to-use guidance or name alternatives, but the context of 'popular' vs. 'search' and 'details' gives some implied differentiation. No prerequisites or exclusions are mentioned.

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

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