Skip to main content
Glama
drakonkat

wizzy-mcp-tmdb

person_details

Retrieve detailed information about actors, directors, and other film professionals from The Movie Database, including biographies, credits, and additional data for content analysis.

Instructions

Retrieves detailed information about a person (actor, director, etc.) from TMDB. Input: person_id (required TMDB ID), language (optional ISO 639-1 code), append (optional comma-separated fields like images,combined_credits,external_ids). Output: JSON with biography, birth/death info, and appended data. Purpose: Get comprehensive person profiles for AI-driven content analysis or recommendations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appendNoComma-separated append_to_response (e.g., images,combined_credits,external_ids)
languageNoISO 639-1 code (e.g., en-US)
person_idYesTMDB Person ID

Implementation Reference

  • The asynchronous handler function for the 'person_details' tool. It fetches detailed person information from the TMDB API using the tmdbFetch helper and returns the data as a formatted JSON text content block.
    handler: async ({person_id, language, append}) => {
        const data = await tmdbFetch(`/person/${person_id}`, {language, append_to_response: append});
        return {content: [{type: "text", text: JSON.stringify(data, null, 2)}]};
    }
  • The input schema defining the parameters for the 'person_details' tool: person_id (required number), language (optional string), append (optional string for additional fields).
    inputSchema: {
        type: "object",
        properties: {
            person_id: {type: "number", description: "TMDB Person ID"},
            language: {type: "string", description: "ISO 639-1 code (e.g., en-US)"},
            append: {
                type: "string",
                description: "Comma-separated append_to_response (e.g., images,combined_credits,external_ids)"
            }
        },
        required: ["person_id"],
        additionalProperties: false
    },
  • The complete tool registration object for 'person_details' added to the tools array, which is used by the MCP server's listTools and callTool request handlers.
    {
        name: "person_details",
        description: "Retrieves detailed information about a person (actor, director, etc.) from TMDB. Input: person_id (required TMDB ID), language (optional ISO 639-1 code), append (optional comma-separated fields like images,combined_credits,external_ids). Output: JSON with biography, birth/death info, and appended data. Purpose: Get comprehensive person profiles for AI-driven content analysis or recommendations.",
        inputSchema: {
            type: "object",
            properties: {
                person_id: {type: "number", description: "TMDB Person ID"},
                language: {type: "string", description: "ISO 639-1 code (e.g., en-US)"},
                append: {
                    type: "string",
                    description: "Comma-separated append_to_response (e.g., images,combined_credits,external_ids)"
                }
            },
            required: ["person_id"],
            additionalProperties: false
        },
        handler: async ({person_id, language, append}) => {
            const data = await tmdbFetch(`/person/${person_id}`, {language, append_to_response: append});
            return {content: [{type: "text", text: JSON.stringify(data, null, 2)}]};
        }
    },
  • Helper function tmdbFetch used by the person_details handler (and other tools) to make authenticated API requests to the TMDB proxy endpoint.
    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