Skip to main content
Glama
drakonkat

wizzy-mcp-tmdb

movie_credits

Fetch cast and crew credits for any movie using its TMDB ID to support movie analysis and AI-powered recommendations.

Instructions

Fetches cast and crew credits for a movie. Input: movie_id (required TMDB ID), language (optional ISO 639-1 code). Output: JSON with cast and crew details. Purpose: Retrieve detailed personnel information for movie analysis and recommendations by AI agents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
languageNoISO 639-1 code (e.g., en-US)
movie_idYesTMDB Movie ID

Implementation Reference

  • The handler function executes the core logic of the movie_credits tool by calling the TMDB API endpoint for movie credits and returning the JSON-formatted response.
    handler: async ({movie_id, language}) => {
        const data = await tmdbFetch(`/movie/${movie_id}/credits`, {language});
        return {content: [{type: "text", text: JSON.stringify(data, null, 2)}]};
    }
  • The inputSchema defines the expected parameters for the movie_credits tool: required movie_id (number) and optional language (string).
    inputSchema: {
        type: "object",
        properties: {
            movie_id: {type: "number", description: "TMDB Movie ID"},
            language: {type: "string", description: "ISO 639-1 code (e.g., en-US)"}
        },
        required: ["movie_id"],
        additionalProperties: false
    },
  • The complete tool registration object for movie_credits in the tools array, binding name, description, schema, and handler for MCP server registration.
    {
        name: "movie_credits",
        description: "Fetches cast and crew credits for a movie. Input: movie_id (required TMDB ID), language (optional ISO 639-1 code). Output: JSON with cast and crew details. Purpose: Retrieve detailed personnel information for movie analysis and recommendations by AI agents.",
        inputSchema: {
            type: "object",
            properties: {
                movie_id: {type: "number", description: "TMDB Movie ID"},
                language: {type: "string", description: "ISO 639-1 code (e.g., en-US)"}
            },
            required: ["movie_id"],
            additionalProperties: false
        },
        handler: async ({movie_id, language}) => {
            const data = await tmdbFetch(`/movie/${movie_id}/credits`, {language});
            return {content: [{type: "text", text: JSON.stringify(data, null, 2)}]};
        }
    },
  • The tmdbFetch helper function used by the movie_credits handler to make authenticated API requests to TMDB.
    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();
    }

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