Skip to main content
Glama

search_tmdb_person

Search for actors, directors, and other film professionals in The Movie Database to support cast and crew analysis for AI agents.

Instructions

Searches for people (actors, directors, etc.) in TMDB. Input: query (required search string), page (optional), language (optional ISO 639-1), include_adult (optional boolean), region (optional ISO 3166-1). Output: JSON with paginated person results. Purpose: Discover individuals for cast/crew analysis by AI agents.

Input Schema

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

Implementation Reference

  • The handler function that executes the search_tmdb_person tool logic by calling tmdbFetch on the TMDB /search/person endpoint and returning the JSON-stringified results.
    handler: async ({query, page, language, include_adult, region}) => { const data = await tmdbFetch('/search/person', {query, page, language, include_adult, region}); return {content: [{type: 'text', text: JSON.stringify(data, null, 2)}]}; }
  • The input schema for validating arguments to the search_tmdb_person tool.
    inputSchema: { type: "object", properties: { query: {type: "string", description: "Search query for people"}, 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 full tool registration object in the tools array, defining name, description, inputSchema, and handler for search_tmdb_person.
    { name: "search_tmdb_person", description: "Searches for people (actors, directors, etc.) in TMDB. Input: query (required search string), page (optional), language (optional ISO 639-1), include_adult (optional boolean), region (optional ISO 3166-1). Output: JSON with paginated person results. Purpose: Discover individuals for cast/crew analysis by AI agents.", inputSchema: { type: "object", properties: { query: {type: "string", description: "Search query for people"}, 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, page, language, include_adult, region}) => { const data = await tmdbFetch('/search/person', {query, page, language, include_adult, region}); return {content: [{type: 'text', text: JSON.stringify(data, null, 2)}]}; } },
  • The tmdbFetch helper function used by the handler to make authenticated API requests to the TMDB search/person 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