Skip to main content
Glama
AmeliaMiddleton

moviefinder-mcp

get_similar

Retrieve a list of movies similar to a specified movie using its unique ID.

Instructions

Get movies similar to a given movie.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
movie_idYes

Implementation Reference

  • src/index.ts:107-121 (registration)
    The server.tool() call that registers 'get_similar' with its schema and handler function.
    server.tool(
      "get_similar",
      "Get movies similar to a given movie.",
      { movie_id: z.number().int().positive() },
      async ({ movie_id }) => {
        try {
          const data = await tmdbFetch<{ results: any[] }>(
            `/movie/${movie_id}/similar`
          );
          return jsonResult({ results: summarizeList(data.results) });
        } catch (err) {
          return errorResult(err);
        }
      }
    );
  • Zod schema for get_similar: requires movie_id as a positive integer.
    { movie_id: z.number().int().positive() },
  • The async handler for get_similar: calls TMDB /movie/{movie_id}/similar endpoint and returns summarized results.
    server.tool(
      "get_similar",
      "Get movies similar to a given movie.",
      { movie_id: z.number().int().positive() },
      async ({ movie_id }) => {
        try {
          const data = await tmdbFetch<{ results: any[] }>(
            `/movie/${movie_id}/similar`
          );
          return jsonResult({ results: summarizeList(data.results) });
        } catch (err) {
          return errorResult(err);
        }
      }
    );
  • summarizeList helper used by get_similar to format the movie results array (limited to 20 items).
    export function summarizeList(items: RawMovie[] | undefined, limit = 20) {
      return (items ?? []).slice(0, limit).map(summarizeMovie);
    }
  • tmdbFetch helper used by get_similar to make authenticated HTTP requests to the TMDB API.
    export async function tmdbFetch<T = unknown>(
      path: string,
      query: Record<string, string | number | undefined> = {}
    ): Promise<T> {
      const url = new URL(BASE_URL + path);
      for (const [k, v] of Object.entries(query)) {
        if (v !== undefined && v !== null && v !== "") {
          url.searchParams.set(k, String(v));
        }
      }
    
      const res = await fetch(url, {
        headers: {
          Authorization: `Bearer ${getToken()}`,
          Accept: "application/json",
        },
      });
    
      if (!res.ok) {
        const text = await res.text().catch(() => "");
        if (res.status === 401) {
          throw new TmdbError(
            "TMDB rejected the request (401). Check that TMDB_API_KEY is your v4 read access token, not a v3 API key.",
            401
          );
        }
        if (res.status === 404) {
          throw new TmdbError(
            `TMDB resource not found (404) for ${path}. Verify the ID exists.`,
            404
          );
        }
        if (res.status === 429) {
          const retry = res.headers.get("retry-after");
          throw new TmdbError(
            `TMDB rate limit exceeded (429).${retry ? ` Retry after ${retry}s.` : " Slow down requests and retry."}`,
            429
          );
        }
        throw new TmdbError(
          `TMDB request failed (${res.status}) for ${path}: ${text || res.statusText}`,
          res.status
        );
      }
    
      return (await res.json()) as T;
    }
Behavior2/5

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

No annotations are present, so the description carries the full burden. It does not disclose how 'similar' is determined, whether results are limited, or any behavioral traits like ordering, pagination, or authentication requirements.

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

Conciseness3/5

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

The description is a single sentence, highly concise. However, it sacrifices necessary information for brevity, making it only minimally adequate.

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

Completeness2/5

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

Given no annotations, no output schema, and a single parameter, the description fails to provide sufficient context such as return format, result count, or typical use cases.

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?

Schema coverage is 0%, but the description does not add meaning beyond the schema. It does not explain what movie_id refers to (e.g., source, format) despite schema having only one parameter.

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

Purpose4/5

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

The description clearly states the verb and resource: 'Get movies similar to a given movie.' It identifies the input (a movie) and the output (similar movies), but does not differentiate from sibling tools like 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 Guidelines2/5

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

No guidance on when to use this tool versus alternatives (e.g., get_recommendations). No context, prerequisites, or exclusions provided.

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