get-movie-details
Retrieve comprehensive information about a specific movie by providing its ID, enabling detailed insights for analysis or recommendations via the TMDB MCP Server.
Instructions
Get detailed information about a specific movie
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| movieId | Yes | ID of the movie to get details for |
Implementation Reference
- src/tools.ts:116-126 (handler)The MCP tool handler function for 'get-movie-details' that invokes the TMDB API helper and handles errors by returning a text message on failure."get-movie-details": async ({ movieId }: { movieId: string }) => { try { const result = await getMovieDetails(movieId); return result; } catch (error: unknown) { if (error instanceof Error) { return { text: `Failed to get movie details: ${error.message}` }; } return { text: "Failed to get movie details: Unknown error" }; } },
- src/tools.ts:56-69 (schema)The tool schema definition including name, description, and input schema requiring a 'movieId' string."get-movie-details": { name: "get-movie-details", description: "Get detailed information about a specific movie", inputSchema: { type: "object", properties: { movieId: { type: "string", description: "ID of the movie to get details for", }, }, required: ["movieId"], }, },
- src/tmdb-api.ts:115-129 (helper)The supporting function that performs the HTTP request to the TMDB API to fetch movie details, including credits, videos, and images.export async function getMovieDetails(movieId: number | string): Promise<MovieDetailsResponse> { try { const response = await axiosWithRetry<MovieDetailsResponse>({ url: `/movie/${movieId}`, params: { append_to_response: 'credits,videos,images' } }); return response.data; } catch (error) { const err = error as Error; console.error('Error getting movie details:', err.message); throw new Error(`Failed to get movie details: ${err.message}`); } }