Skip to main content
Glama
drakonkat

wizzy-mcp-tmdb

movie_reviews

Retrieve user reviews and ratings for movies to analyze public opinions and critiques for sentiment analysis.

Instructions

Retrieves user reviews and ratings for a movie. Input: movie_id (required TMDB ID), language (optional ISO 639-1 code), page (optional), region (optional ISO 3166-1 code). Output: JSON with paginated review results. Purpose: Access public opinions and critiques for sentiment analysis by AI agents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
languageNoISO 639-1 code (e.g., en-US)
movie_idYesTMDB Movie ID
pageNoPage number
regionNoISO 3166-1 region code (e.g., US)

Implementation Reference

  • The handler function that implements the core logic of the movie_reviews tool by fetching user reviews from the TMDB API endpoint `/movie/{movie_id}/reviews` and returning the paginated JSON results as MCP-formatted text content.
    handler: async ({movie_id, language, page, region}) => {
        const data = await tmdbFetch(`/movie/${movie_id}/reviews`, {language, page, region});
        return {content: [{type: "text", text: JSON.stringify(data, null, 2)}]};
    }
  • The inputSchema defining the expected parameters and validation rules for the movie_reviews tool, including required movie_id and optional language, page, and region.
    inputSchema: {
        type: "object",
        properties: {
            movie_id: {type: "number", description: "TMDB Movie ID"},
            language: {type: "string", description: "ISO 639-1 code (e.g., en-US)"},
            page: {type: "number", minimum: 1, description: "Page number"},
            region: {type: "string", description: "ISO 3166-1 region code (e.g., US)"}
        },
        required: ["movie_id"],
        additionalProperties: false
    },
  • The tmdbFetch helper utility function used by the movie_reviews handler (and other tools) to make authenticated API requests to the TMDB proxy service.
    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();
    }
  • Registration of the ListToolsRequestHandler which exposes the movie_reviews tool (along with others) via the tools.map, providing name, description, and inputSchema to MCP clients.
    server.setRequestHandler(ListToolsRequestSchema, async (_req) => ({
        tools: tools.map(({name, description, inputSchema}) => ({name, description, inputSchema})),
    }));
  • Registration of the CallToolRequestHandler which dispatches calls to the movie_reviews tool's handler by finding it in the tools array by name and executing it with the provided arguments.
    server.setRequestHandler(CallToolRequestSchema, async (req) => {
        const {name, arguments: args} = req.params || {};
        const tool = tools.find(t => t.name === name);
        if (!tool) {
            await sendLog("error", `Unknown tool called: ${name || "<missing>"} with args: ${JSON.stringify(args || {})}`);
            throw new Error(`Unknown tool: ${name}`);
        }
        await sendLog("info", `Calling tool: ${name} with args: ${JSON.stringify(args || {})}`);
        try {
            const start = Date.now();
            const res = await tool.handler(args || {});
            const ms = Date.now() - start;
            await sendLog("info", `Tool success: ${name} in ${ms}ms`);
            return res;
        } catch (err) {
            await sendLog("error", `Tool error: ${name} -> ${err && err.message ? err.message : String(err)}`);
            throw err;
        }
    });
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 of behavioral disclosure. It mentions the output is 'JSON with paginated review results,' which adds useful context about format and pagination. However, it lacks details on rate limits, authentication needs, error handling, or whether this is a read-only operation (implied by 'retrieves' but not explicit). The description doesn't contradict annotations, but could be more comprehensive.

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 with three sentences that cover purpose, input, output, and usage context. It's front-loaded with the core function, and each sentence adds value without redundancy. However, the input listing could be more integrated into the flow rather than as a separate clause.

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 provides basic context: purpose, parameters, and output format. It mentions pagination, which is helpful. However, for a tool with 4 parameters and complex sibling tools, it lacks details on error cases, example usage, or deeper behavioral traits (e.g., data freshness, limits). This makes it adequate but with clear gaps for an AI agent.

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?

The description lists all parameters and their types (e.g., 'movie_id (required TMDB ID)'), but the input schema already has 100% coverage with clear descriptions (e.g., 'ISO 639-1 code'). The description adds minimal value beyond the schema, such as noting 'movie_id' is required, which is also in the schema. Baseline is 3 since the schema does the heavy lifting.

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 the tool's purpose: 'Retrieves user reviews and ratings for a movie.' It specifies the resource (movie reviews/ratings) and verb (retrieves), making it easy to understand. However, it doesn't explicitly differentiate from siblings like 'get_tmdb_details' or 'search_tmdb_movies' which might also return movie-related data, though the focus on reviews is implied.

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 provides some usage context by stating the purpose is for 'sentiment analysis by AI agents,' which implies when to use it. However, it doesn't explicitly mention when not to use it or name alternatives among the many sibling tools (e.g., vs. 'get_tmdb_details' for general info). This leaves room for ambiguity in tool selection.

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