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
| Name | Required | Description | Default |
|---|---|---|---|
| append | No | Comma-separated append_to_response (e.g., images,combined_credits,external_ids) | |
| language | No | ISO 639-1 code (e.g., en-US) | |
| person_id | Yes | TMDB Person ID |
Implementation Reference
- mcp-tmdb-server.js:102-105 (handler)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)}]}; }
- mcp-tmdb-server.js:89-101 (schema)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 },
- mcp-tmdb-server.js:86-106 (registration)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)}]}; } },
- mcp-tmdb-server.js:18-38 (helper)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(); }