Skip to main content
Glama
AmeliaMiddleton

moviefinder-mcp

get_trending

Find trending movies, TV shows, or both for a selected time window (day or week). Retrieves popular titles based on current trends.

Instructions

Get trending movies, TV, or both, for the day or the week.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
media_typeYesType of media to fetch trends for.
time_windowYesTrend time window.

Implementation Reference

  • src/index.ts:95-100 (registration)
    Registration of the 'get_trending' tool with the MCP server, binding the schema and handler.
    server.tool(
      "get_trending",
      "Get trending movies, TV, or both, for the day or the week.",
      getTrendingSchema,
      wrap(getTrending),
    );
  • Zod schema defining the input parameters for get_trending: media_type (movie/tv/all) and time_window (day/week).
    export const getTrendingSchema = {
      media_type: z.enum(["movie", "tv", "all"]).describe("Type of media to fetch trends for."),
      time_window: z.enum(["day", "week"]).describe("Trend time window."),
    };
  • The main handler function for get_trending. Calls TMDB API /trending/{media_type}/{time_window} and maps results using summarizeTrending.
    export async function getTrending(args: {
      media_type: "movie" | "tv" | "all";
      time_window: "day" | "week";
    }) {
      const data = await tmdbGet<PaginatedResponse<TrendingItem>>(
        `/trending/${args.media_type}/${args.time_window}`,
        { language: "en-US" },
      );
      return {
        total_results: data.total_results,
        results: data.results.map(summarizeTrending),
      };
    }
  • Helper function summarizeTrending used to format each trending result item (id, media_type, title, year, overview, rating, poster).
    function summarizeTrending(item: TrendingItem) {
      return {
        id: item.id,
        media_type: item.media_type,
        title: item.title ?? item.name ?? "",
        year: yearOf(item.release_date ?? item.first_air_date),
        overview: item.overview ?? null,
        rating: item.vote_average ?? null,
        poster: posterUrl(item.poster_path),
      };
    }
  • TrendingItem interface definition used by getTrending, with optional title/name fields since trending can be movie or TV.
    interface TrendingItem {
      id: number;
      media_type: "movie" | "tv";
      title?: string;
      name?: string;
      release_date?: string | null;
      first_air_date?: string | null;
      overview?: string | null;
      vote_average?: number | null;
      poster_path?: string | null;
    }
Behavior2/5

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

No annotations provided, so description must fully disclose behavior. Description only states basic functionality without mentioning response format, pagination, or any side effects. Minimal transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, 14 words—concise and front-loaded. Could be slightly more informative without being verbose, but still efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple trending endpoint with two required parameters, the description captures the core purpose. However, lack of output schema and behavioral details leaves agent with incomplete picture.

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?

Schema description coverage is 100%, so baseline is 3. Description does not add any additional meaning beyond the enums already described in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the verb (Get), resource (trending), and scope (movies/TV, day/week). It effectively distinguishes from sibling tools like search_movies or discover_movies by focusing on trending content.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives like search_movies or discover_movies. The description does not provide context for selection criteria.

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/AmeliaMiddleton/Mcp1testtypescript'

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