Skip to main content
Glama
AmeliaMiddleton

moviefinder-mcp

get_movie_details

Retrieve full movie details including top cast, directors, and trailer by providing a movie ID. Quickly obtain comprehensive information for any movie.

Instructions

Get full details for a movie, including top cast, directors, and trailer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
movie_idYes

Implementation Reference

  • The tool handler for 'get_movie_details'. It calls TMDB /movie/{movie_id} with credits and videos appended, then formats the result via summarizeDetails.
    server.tool(
      "get_movie_details",
      "Get full details for a movie, including top cast, directors, and trailer.",
      { movie_id: z.number().int().positive() },
      async ({ movie_id }) => {
        try {
          const data = await tmdbFetch(`/movie/${movie_id}`, {
            append_to_response: "credits,videos",
          });
          return jsonResult(summarizeDetails(data as any));
        } catch (err) {
          return errorResult(err);
        }
      }
    );
  • Zod schema for the tool's input: movie_id is a positive integer.
    { movie_id: z.number().int().positive() },
  • summarizeDetails function that transforms raw TMDB movie details into a structured response with title, year, tagline, overview, rating, runtime, genres, status, homepage, imdb_id, poster, directors (top 10 cast), and YouTube trailer link.
    export function summarizeDetails(d: RawDetails) {
      const cast = (d.credits?.cast ?? [])
        .slice(0, 10)
        .map((c) => ({ name: c.name, character: c.character ?? null }));
      const directors = (d.credits?.crew ?? [])
        .filter((c) => c.job === "Director")
        .map((c) => c.name);
      const trailer = (d.videos?.results ?? []).find(
        (v) => v.site === "YouTube" && v.type === "Trailer" && v.official !== false
      );
    
      return {
        id: d.id,
        title: d.title ?? d.original_title ?? "",
        year: yearOf(d.release_date),
        tagline: d.tagline || null,
        overview: d.overview ?? "",
        rating: d.vote_average ?? null,
        vote_count: d.vote_count ?? null,
        runtime_minutes: d.runtime ?? null,
        genres: (d.genres ?? []).map((g) => g.name),
        status: d.status ?? null,
        homepage: d.homepage || null,
        imdb_id: d.imdb_id ?? null,
        poster: posterUrl(d.poster_path),
        directors,
        cast,
        trailer: trailer
          ? { name: trailer.name, youtube_url: `https://www.youtube.com/watch?v=${trailer.key}` }
          : null,
      };
    }
  • posterUrl helper constructs the full image URL from TMDB's poster path.
    export function posterUrl(path: string | null | undefined): string | null {
      return path ? `${IMAGE_BASE}${path}` : null;
    }
    
    export function yearOf(date: string | null | undefined): number | null {
      if (!date) return null;
      const y = Number(date.slice(0, 4));
      return Number.isFinite(y) ? y : null;
    }
  • yearOf helper extracts a 4-digit year from a date string.
    export function yearOf(date: string | null | undefined): number | null {
      if (!date) return null;
      const y = Number(date.slice(0, 4));
      return Number.isFinite(y) ? y : null;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It does not disclose whether the tool is read-only, requires authentication, or has any side effects. It lacks details about limitations or error conditions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, 14 words, front-loaded with the core purpose. No redundancy or verbosity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simple input (one integer ID) and no output schema, the description gives a reasonable hint about output (cast, directors, trailer). It is mostly complete for a retrieval tool, though more detail on other fields would improve it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description must compensate but only implicitly references the movie_id via the tool name. It adds no clarification on how to obtain the ID or format expectations.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves full details for a specific movie, listing examples (top cast, directors, trailer) that distinguish it from sibling tools like search_movies or get_recommendations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use when needing detailed information about a single movie, but does not explicitly state when not to use or provide alternatives. The tool's straightforward purpose makes this less critical.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/AmeliaMiddleton/Php1mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server