Skip to main content
Glama
AmeliaMiddleton

moviefinder-mcp

search_tv

Search for TV shows by entering a title or keywords, using TMDB data.

Instructions

Search TMDB for TV shows by name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesTV show title or keywords.

Implementation Reference

  • The main handler function that executes the search_tv tool logic. It calls TMDB's /search/tv endpoint with the query, filters to English/adult=false, and maps results via summarizeTv.
    export async function searchTv(args: { query: string }) {
      const data = await tmdbGet<PaginatedResponse<TvListItem>>("/search/tv", {
        query: args.query,
        include_adult: "false",
        language: "en-US",
      });
      return {
        page: data.page,
        total_results: data.total_results,
        results: data.results.map(summarizeTv),
      };
    }
  • Zod schema for the search_tv input parameter. Defines a single required 'query' string field.
    export const searchTvSchema = {
      query: z.string().min(1).describe("TV show title or keywords."),
    };
  • src/index.ts:67-72 (registration)
    Registers the tool named 'search_tv' on the MCP server with description 'Search TMDB for TV shows by name.', using searchTvSchema and wrapping searchTv for error handling.
    server.tool(
      "search_tv",
      "Search TMDB for TV shows by name.",
      searchTvSchema,
      wrap(searchTv),
    );
  • Helper function summarizeTv used by searchTv to format each TV result into a consistent shape (id, name, year, overview, rating, poster).
    function summarizeTv(t: TvListItem) {
      return {
        id: t.id,
        name: t.name,
        year: yearOf(t.first_air_date),
        overview: t.overview ?? null,
        rating: t.vote_average ?? null,
        poster: posterUrl(t.poster_path),
      };
    }
  • Calls tmdbGet to fetch data from TMDB's /search/tv endpoint with the user's query (include_adult=false, language=en-US).
    const data = await tmdbGet<PaginatedResponse<TvListItem>>("/search/tv", {
      query: args.query,
      include_adult: "false",
      language: "en-US",
    });
Behavior2/5

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

No annotations are provided, and the description does not disclose behavioral traits such as read-only nature, result format, or side effects. It only states the search action.

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

Conciseness4/5

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

A single sentence containing only essential information. It is appropriately sized and front-loaded, though could be expanded slightly without losing conciseness.

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 the lack of output schema and annotations, the description should provide more context about return values, pagination, or limitations. It is insufficient for an AI to fully understand the tool's behavior.

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

Parameters3/5

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

Schema coverage is 100% with the 'query' parameter already described as 'TV show title or keywords.' The description adds no additional meaning beyond the schema, hence baseline 3.

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 verb 'search', resource 'TMDB for TV shows', and search criterion 'by name'. It distinguishes from sibling tools like 'search_movies' and 'discover_movies' which target movies.

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 like 'search_movies' or 'discover_movies'. The description lacks explicit context or exclusions.

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/Mcp1testtypescript'

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