Skip to main content
Glama
AmeliaMiddleton

moviefinder-mcp

get_trending

Retrieve trending movies, TV shows, or both by specifying media type (movie, tv, or all) and time window (day or week).

Instructions

Get trending movies, TV shows, or both.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
media_typeYes
time_windowYes

Implementation Reference

  • The handler function for the 'get_trending' tool. It calls tmdbFetch on /trending/{media_type}/{time_window} and returns summarized results.
    async ({ media_type, time_window }) => {
      try {
        const data = await tmdbFetch<{ results: any[] }>(
          `/trending/${media_type}/${time_window}`
        );
        return jsonResult({ results: summarizeList(data.results) });
      } catch (err) {
        return errorResult(err);
      }
    }
  • Input schema for get_trending: media_type (movie/tv/all) and time_window (day/week), both using zod enums.
    {
      media_type: z.enum(["movie", "tv", "all"]),
      time_window: z.enum(["day", "week"]),
    },
  • src/index.ts:123-140 (registration)
    Registration of the 'get_trending' tool on the MCP server via server.tool() with name, description, schema, and handler.
    server.tool(
      "get_trending",
      "Get trending movies, TV shows, or both.",
      {
        media_type: z.enum(["movie", "tv", "all"]),
        time_window: z.enum(["day", "week"]),
      },
      async ({ media_type, time_window }) => {
        try {
          const data = await tmdbFetch<{ results: any[] }>(
            `/trending/${media_type}/${time_window}`
          );
          return jsonResult({ results: summarizeList(data.results) });
        } catch (err) {
          return errorResult(err);
        }
      }
    );
  • summarizeList helper function that slices and maps raw items through summarizeMovie.
    export function summarizeList(items: RawMovie[] | undefined, limit = 20) {
      return (items ?? []).slice(0, limit).map(summarizeMovie);
    }
  • summarizeMovie helper that transforms raw movie/TV data into a condensed format with id, title, year, overview, rating, etc.
    export function summarizeMovie(m: RawMovie) {
      const date = m.release_date ?? m.first_air_date ?? null;
      return {
        id: m.id,
        media_type: m.media_type ?? (m.first_air_date ? "tv" : "movie"),
        title: m.title ?? m.name ?? m.original_title ?? m.original_name ?? "",
        year: yearOf(date),
        overview: m.overview ?? "",
        rating: m.vote_average ?? null,
        vote_count: m.vote_count ?? null,
        poster: posterUrl(m.poster_path),
      };
    }
Behavior2/5

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

No annotations are provided, so the description must convey behavioral traits. It only states it 'gets' data, but does not disclose whether results are paginated, cached, limited, or if network calls are made. The description is too sparse to inform safe usage.

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

Conciseness3/5

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

The description is a single sentence that is front-loaded with the core action. However, it is too terse and could be expanded to include parameter context or output hints without harming conciseness.

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 no output schema and simple parameters, the description should at least hint at what the tool returns (e.g., a list of trending items). It does not, leaving the response format ambiguous.

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

Parameters2/5

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

Schema description coverage is 0%, meaning the description does not add any meaning to the parameters. It hints at media_type by mentioning movies/TV shows, but does not explain the time_window parameter or the exact allowed values. The description fails to compensate for missing schema descriptions.

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 it retrieves trending movies, TV shows, or both, matching the media_type enum. The verb 'get' and resource 'trending' are specific. However, it doesn't differentiate from sibling tools like discover_movies, which may also have 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 is provided on when to use this tool versus alternatives such as discover_movies or search_movies. There is no mention of use cases, limitations, or exclusion 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/Php1mcp'

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