Skip to main content
Glama
drakonkat

wizzy-mcp-tmdb

search_tmdb_movies

Search for movies in The Movie Database to find specific films by title, filter by release year, language, and region for AI-driven content discovery.

Instructions

Searches specifically for movies in TMDB. Input: query (required search string), year (optional release year filter), page (optional), language (optional ISO 639-1), include_adult (optional boolean), region (optional ISO 3166-1). Output: JSON with paginated normalized results. Purpose: Targeted movie discovery for AI-driven content queries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
include_adultNoInclude adult results
languageNoISO 639-1 code (e.g., en-US)
pageNoPage number
queryYesSearch query for movies
regionNoISO 3166-1 region code (e.g., US)
yearNoFilter by release year

Implementation Reference

  • The handler function that executes the tool: fetches movie search results from TMDB /search/movie endpoint, normalizes results using mapSearchResult helper, and returns paginated JSON.
    handler: async ({query, year, page, language, include_adult, region}) => {
        const data = await tmdbFetch("/search/movie", {query, year, page, language, include_adult, region});
        const results = (data.results || []).map(mapSearchResult);
        return {
            content: [{
                type: "text",
                text: JSON.stringify({
                    page: data.page,
                    total_pages: data.total_pages,
                    total_results: data.total_results,
                    results
                }, null, 2)
            }]
        };
    },
  • Input JSON Schema for the tool, specifying required 'query' and optional filters like year, page, language, etc.
    inputSchema: {
        type: "object",
        properties: {
            query: {type: "string", description: "Search query for movies"},
            year: {type: "number", description: "Filter by release year"},
            page: {type: "number", minimum: 1, description: "Page number"},
            language: {type: "string", description: "ISO 639-1 code (e.g., en-US)"},
            include_adult: {type: "boolean", description: "Include adult results"},
            region: {type: "string", description: "ISO 3166-1 region code (e.g., US)"},
        },
        required: ["query"],
        additionalProperties: false,
    },
  • The complete tool definition object registered in the 'tools' array, including name, description, schema, and handler.
    {
        name: "search_tmdb_movies",
        description: "Searches specifically for movies in TMDB. Input: query (required search string), year (optional release year filter), page (optional), language (optional ISO 639-1), include_adult (optional boolean), region (optional ISO 3166-1). Output: JSON with paginated normalized results. Purpose: Targeted movie discovery for AI-driven content queries.",
        inputSchema: {
            type: "object",
            properties: {
                query: {type: "string", description: "Search query for movies"},
                year: {type: "number", description: "Filter by release year"},
                page: {type: "number", minimum: 1, description: "Page number"},
                language: {type: "string", description: "ISO 639-1 code (e.g., en-US)"},
                include_adult: {type: "boolean", description: "Include adult results"},
                region: {type: "string", description: "ISO 3166-1 region code (e.g., US)"},
            },
            required: ["query"],
            additionalProperties: false,
        },
        handler: async ({query, year, page, language, include_adult, region}) => {
            const data = await tmdbFetch("/search/movie", {query, year, page, language, include_adult, region});
            const results = (data.results || []).map(mapSearchResult);
            return {
                content: [{
                    type: "text",
                    text: JSON.stringify({
                        page: data.page,
                        total_pages: data.total_pages,
                        total_results: data.total_results,
                        results
                    }, null, 2)
                }]
            };
        },
    },
  • Helper function to normalize and compact TMDB search result items for consistent output format, called by the handler.
    function mapSearchResult(item) {
        const media_type = item.media_type || (item.title ? "movie" : item.name ? "tv" : "unknown");
        const title = item.title || item.name || "";
        const date = item.release_date || item.first_air_date || "";
        return {
            id: item.id,
            media_type,
            title,
            date,
            original_language: item.original_language,
            popularity: item.popularity,
            vote_average: item.vote_average,
            overview: item.overview,
        };
    }
  • Utility function for making authenticated HTTP requests to the TMDB API via proxy, used by the tool handler.
    async function tmdbFetch(path, params = {}) {
        if (!TMDB_AUTH_TOKEN) {
            throw new Error("TMDB authorization token is not configured");
        }
        const url = new URL(TMDB_BASE + path);
        Object.entries(params).forEach(([k, v]) => {
            if (v !== undefined && v !== null && v !== "") url.searchParams.set(k, String(v));
        });
    
        const res = await fetch(url, {
            headers: {
                Accept: "application/json",
                Authorization: TMDB_AUTH_TOKEN,
            },
        });
        if (!res.ok) {
            const text = await res.text().catch(() => "");
            throw new Error(`TMDB request failed ${res.status}: ${text}`);
        }
        return res.json();
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that output is 'JSON with paginated normalized results,' which adds behavioral context beyond the input schema. However, it doesn't cover aspects like rate limits, authentication needs, error handling, or what 'normalized' entails, leaving gaps for a search tool.

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?

The description is appropriately sized and front-loaded, starting with the core purpose. The parameter list is concise but could be integrated more smoothly; the final sentence adds value by stating the tool's purpose clearly. Minimal waste, though slightly fragmented.

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?

Given no annotations and no output schema, the description partially compensates by mentioning output format and pagination. However, for a search tool with 6 parameters and rich sibling tools, it lacks details on result structure, error cases, or integration context, making it adequate but with clear gaps.

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 the schema already documents all parameters thoroughly. The description lists parameters but doesn't add meaningful semantics beyond what's in the schema (e.g., it repeats 'optional' without extra context). Baseline 3 is appropriate as the schema does the heavy lifting.

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 with a specific verb ('Searches') and resource ('movies in TMDB'), and distinguishes it from siblings by specifying 'specifically for movies' (vs. search_tmdb, search_tmdb_person, search_tmdb_tv). The final sentence reinforces the targeted use case.

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 through 'Targeted movie discovery for AI-driven content queries,' suggesting it's for movie-specific searches. However, it lacks explicit guidance on when to use this tool versus alternatives like search_tmdb (general search) or discover_movies (non-query-based discovery), and doesn't mention exclusions or prerequisites.

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/drakonkat/wizzy-mcp-tmdb'

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