movie_lists
Find curated collections and lists that include specific movies to support content curation and discovery workflows.
Instructions
Retrieves lists and collections that include a specific movie. Input: movie_id (required TMDB ID), language (optional ISO 639-1 code), page (optional page number). Output: JSON with paginated results of lists containing the movie. Purpose: Discover curated collections and lists featuring a movie for content curation by AI agents.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| language | No | ISO 639-1 language (e.g., en-US) | |
| movie_id | Yes | TMDB Movie ID | |
| page | No | Page number |
Implementation Reference
- mcp-tmdb-server.js:125-128 (handler)The handler function implementing the tool logic: fetches lists containing the specified movie from TMDB and returns the data as formatted JSON text.handler: async ({movie_id, language, page}) => { const data = await tmdbFetch(`/movie/${movie_id}/lists`, {language, page}); return {content: [{type: "text", text: JSON.stringify(data, null, 2)}]}; }
- mcp-tmdb-server.js:115-124 (schema)Input schema for validating tool arguments: requires movie_id (TMDB Movie ID), optional language and page.inputSchema: { type: "object", properties: { movie_id: {type: "number", description: "TMDB Movie ID"}, language: {type: "string", description: "ISO 639-1 language (e.g., en-US)"}, page: {type: "number", minimum: 1, description: "Page number"} }, required: ["movie_id"], additionalProperties: false },
- mcp-tmdb-server.js:112-129 (registration)The tool registration object added to the 'tools' array, which is used by the MCP server's listTools and callTool request handlers.{ name: "movie_lists", description: "Retrieves lists and collections that include a specific movie. Input: movie_id (required TMDB ID), language (optional ISO 639-1 code), page (optional page number). Output: JSON with paginated results of lists containing the movie. Purpose: Discover curated collections and lists featuring a movie for content curation by AI agents.", inputSchema: { type: "object", properties: { movie_id: {type: "number", description: "TMDB Movie ID"}, language: {type: "string", description: "ISO 639-1 language (e.g., en-US)"}, page: {type: "number", minimum: 1, description: "Page number"} }, required: ["movie_id"], additionalProperties: false }, handler: async ({movie_id, language, page}) => { const data = await tmdbFetch(`/movie/${movie_id}/lists`, {language, page}); return {content: [{type: "text", text: JSON.stringify(data, null, 2)}]}; } },
- mcp-tmdb-server.js:18-38 (helper)Helper function used by the handler to perform 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(); }