Skip to main content
Glama
AmeliaMiddleton

moviefinder-mcp

where_to_stream

Look up streaming, rental, and purchase providers for a movie in a specified country.

Instructions

Find streaming, rental, and purchase providers for a movie in a given country (default US). Data sourced from JustWatch via TMDB.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
movie_idYes
country_codeNo

Implementation Reference

  • src/index.ts:142-161 (registration)
    Registration of the 'where_to_stream' MCP tool using server.tool(). Defines input schema (movie_id, optional country_code) and calls the handler.
    server.tool(
      "where_to_stream",
      "Find streaming, rental, and purchase providers for a movie in a given country (default US). Data sourced from JustWatch via TMDB.",
      {
        movie_id: z.number().int().positive(),
        country_code: z
          .string()
          .length(2, "country_code must be a 2-letter ISO 3166-1 code")
          .optional(),
      },
      async ({ movie_id, country_code }) => {
        try {
          const country = (country_code ?? "US").toUpperCase();
          const data = await tmdbFetch(`/movie/${movie_id}/watch/providers`);
          return jsonResult(summarizeProviders(data as any, country));
        } catch (err) {
          return errorResult(err);
        }
      }
    );
  • Handler function for 'where_to_stream'. Fetches watch providers from TMDB API (/movie/{id}/watch/providers) and formats the response using summarizeProviders.
    async ({ movie_id, country_code }) => {
      try {
        const country = (country_code ?? "US").toUpperCase();
        const data = await tmdbFetch(`/movie/${movie_id}/watch/providers`);
        return jsonResult(summarizeProviders(data as any, country));
      } catch (err) {
        return errorResult(err);
      }
    }
  • Type definition (RawProviders) for the TMDB watch providers API response shape, including flatrate, rent, buy, free, and ads provider arrays per country.
    interface RawProviders {
      id?: number;
      results?: Record<
        string,
        {
          link?: string;
          flatrate?: { provider_name: string }[];
          rent?: { provider_name: string }[];
          buy?: { provider_name: string }[];
          free?: { provider_name: string }[];
          ads?: { provider_name: string }[];
        }
      >;
    }
  • Helper function summarizeProviders that extracts and formats streaming/rental/buy/free/ads provider names for a given country from the raw TMDB data.
    export function summarizeProviders(data: RawProviders, country: string) {
      const region = data.results?.[country.toUpperCase()];
      if (!region) {
        return {
          country: country.toUpperCase(),
          available: false,
          message: `No watch provider data for country ${country.toUpperCase()}.`,
        };
      }
      const names = (arr?: { provider_name: string }[]) =>
        (arr ?? []).map((p) => p.provider_name);
      return {
        country: country.toUpperCase(),
        available: true,
        link: region.link ?? null,
        stream: names(region.flatrate),
        free: names(region.free),
        ads: names(region.ads),
        rent: names(region.rent),
        buy: names(region.buy),
      };
    }
Behavior3/5

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

No annotations are provided, so the description carries full burden. It mentions data sourcing from JustWatch via TMDB but does not disclose what happens when no providers are found, potential rate limits, or authentication requirements.

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 two sentences, front-loaded with the key action, and every sentence adds value. No wasteful words.

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?

With no output schema, the description does not explain the return format or structure. It also lacks information about error handling or edge cases. Adequate for a simple lookup but could be more complete.

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 0%, but the description adds that country_code defaults to US. However, it does not explain the format or constraints of movie_id or country_code beyond what the schema provides.

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 it finds streaming, rental, and purchase providers for a movie, specifying a default country and data source. This verb+resource combination is specific and distinguishes it from siblings like get_movie_details.

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 finding where to watch a movie but does not explicitly compare with alternatives like get_movie_details or search_movies. No direct 'when to use' guidance is given.

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