Skip to main content
Glama
AmeliaMiddleton

moviefinder-mcp

where_to_stream

Look up streaming, rental, and purchase options for a movie via TMDB ID. Optionally set a country code to view local availability.

Instructions

Show streaming, rental, and purchase options for a movie in a given country (defaults to US).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
movie_idYesTMDB movie ID.
country_codeNoISO 3166-1 alpha-2 country code (defaults to US).

Implementation Reference

  • Core handler function that fetches watch provider data from TMDB API for a given movie and country, returning streaming/rent/buy/free options.
    export async function whereToStream(args: { movie_id: number; country_code?: string }) {
      const country = (args.country_code ?? "US").toUpperCase();
      const data = await tmdbGet<WatchProvidersResponse>(
        `/movie/${args.movie_id}/watch/providers`,
      );
      const region = data.results[country];
      if (!region) {
        return {
          movie_id: args.movie_id,
          country: country,
          link: null,
          stream: [],
          rent: [],
          buy: [],
          free: [],
          message: `No watch provider data for country '${country}'.`,
        };
      }
      const names = (list?: ProviderEntry[]) => (list ?? []).map((p) => p.provider_name);
      return {
        movie_id: args.movie_id,
        country,
        link: region.link ?? null,
        stream: names(region.flatrate),
        rent: names(region.rent),
        buy: names(region.buy),
        free: [...names(region.free), ...names(region.ads)],
      };
    }
  • Zod schema for the tool's input: movie_id (required positive int) and country_code (optional 2-letter ISO code).
    export const whereToStreamSchema = {
      movie_id: z.number().int().positive().describe("TMDB movie ID."),
      country_code: z
        .string()
        .length(2)
        .optional()
        .describe("ISO 3166-1 alpha-2 country code (defaults to US)."),
    };
  • src/index.ts:102-107 (registration)
    Registers the 'where_to_stream' tool on the MCP server with its schema and wrapped handler.
    server.tool(
      "where_to_stream",
      "Show streaming, rental, and purchase options for a movie in a given country (defaults to US).",
      whereToStreamSchema,
      wrap(whereToStream),
    );
  • TypeScript interfaces (ProviderEntry and WatchProvidersResponse) used as helper types for the whereToStream function.
    interface ProviderEntry {
      provider_id: number;
      provider_name: string;
      logo_path?: string | null;
    }
    
    interface WatchProvidersResponse {
      id: number;
      results: Record<
        string,
        {
          link?: string;
          flatrate?: ProviderEntry[];
          rent?: ProviderEntry[];
          buy?: ProviderEntry[];
          ads?: ProviderEntry[];
          free?: ProviderEntry[];
        }
      >;
    }
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 the tool shows options, but does not disclose if it's read-only, authentication needs, rate limits, error handling (e.g., missing movie), or output format. Limited transparency.

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, clear sentence that front-loads the action (Show). It is concise and contains no unnecessary words, earning its place efficiently.

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 tool with two parameters and no output schema, the description is adequate but lacks details on error scenarios (e.g., invalid movie_id) or behavior when no options exist. It is minimally complete but could be more robust.

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 coverage is 100% (both parameters described in input schema). The description adds minor context by stating the default country (US), which aligns with the schema's description. It does not add significant new meaning beyond 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?

The description clearly states the tool's purpose: showing streaming, rental, and purchase options for a movie in a given country. It uses a specific verb and resource, and distinguishes from sibling tools (e.g., discover_movies, get_movie_details) by focusing on availability options.

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 when to use the tool (to check availability of a movie) and mentions the default country, but does not explicitly state when not to use it or provide alternatives. Usage guidance is implied but not comprehensive.

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