Skip to main content
Glama
sudhish

Indian Movies MCP Agent

by sudhish

search_movie

Find Indian movies by title using this search tool. Enter a movie name to get specific film information from Bollywood and regional cinema databases.

Instructions

Search for a specific Indian movie by title

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesMovie title to search for

Implementation Reference

  • The main execution logic for the 'search_movie' tool in the stdio MCP server. Searches the indianMovies array for a movie title containing the input 'title' (case-insensitive substring match), logs extensively, and returns movie details as JSON or 'not found' message in MCP content format.
    case 'search_movie': {
      log('=== EXECUTING search_movie TOOL ===');
      log('Processing movie search request...');
      log('Search term received:', args.title);
      log('Search term type:', typeof args.title);
      log('Search term length:', args.title ? args.title.length : 0);
      
      log('=== PERFORMING MOVIE SEARCH ===');
      log('Available movies to search through:', indianMovies.map(m => m.title));
      log('Converting search term to lowercase:', args.title.toLowerCase());
      
      const movie = indianMovies.find(m => {
        const titleMatch = m.title.toLowerCase().includes(args.title.toLowerCase());
        log(`Checking "${m.title}" against "${args.title}": ${titleMatch}`);
        return titleMatch;
      });
    
      let response;
      if (movie) {
        log('=== MOVIE FOUND ===');
        log('Found movie:', movie.title);
        log('Movie details:', JSON.stringify(movie, null, 2));
        response = {
          content: [
            {
              type: 'text',
              text: JSON.stringify(movie, null, 2),
            },
          ],
        };
      } else {
        log('=== MOVIE NOT FOUND ===');
        log('No movie found for search term:', args.title);
        log('Tried searching in:', indianMovies.length, 'movies');
        response = {
          content: [
            {
              type: 'text',
              text: `No movie found with title containing "${args.title}"`,
            },
          ],
        };
      }
      
      log('=== SENDING search_movie RESPONSE ===');
      log('Response type:', movie ? 'Movie details' : 'Not found message');
      log('Full search response:', JSON.stringify(response, null, 2));
      return response;
    }
  • index.js:172-185 (registration)
    Registration of the 'search_movie' tool in the ListTools response for the stdio server, defining its name, description, and input schema requiring a 'title' string.
    {
      name: 'search_movie',
      description: 'Search for a specific Indian movie by title',
      inputSchema: {
        type: 'object',
        properties: {
          title: {
            type: 'string',
            description: 'Movie title to search for',
          },
        },
        required: ['title'],
      },
    },
  • Compact execution logic for the 'search_movie' tool in the HTTP MCP server. Performs case-insensitive substring search on movie titles and returns matching movie JSON or 'not found' message.
    case 'search_movie': {
      const movie = indianMovies.find(m =>
        m.title.toLowerCase().includes(args.title.toLowerCase())
      );
    
      return {
        content: [
          {
            type: 'text',
            text: movie ? JSON.stringify(movie, null, 2) : `No movie found with title containing "${args.title}"`,
          },
        ],
      };
  • http-server.js:58-67 (registration)
    Registration of the 'search_movie' tool in the ListTools response for the HTTP server, defining name, description, and input schema.
    {
      name: 'search_movie',
      description: 'Search for a specific Indian movie by title',
      inputSchema: {
        type: 'object',
        properties: {
          title: { type: 'string', description: 'Movie title to search for' },
        },
        required: ['title'],
      },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the search action but doesn't describe traits like whether it's read-only, if it requires authentication, rate limits, or what the output format might be. This leaves significant gaps for a tool with no annotations.

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?

The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded, making it easy to understand quickly.

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 and no output schema, the description is incomplete. It lacks details on behavioral traits, output format, and usage context, which are essential for a search tool. The high schema coverage doesn't compensate for these missing elements.

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?

The schema description coverage is 100%, so the input schema already documents the 'title' parameter adequately. The description adds no additional meaning beyond what the schema provides, such as search behavior or result details, meeting the baseline for high schema coverage.

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 action ('Search for') and resource ('a specific Indian movie by title'), making the purpose unambiguous. It doesn't explicitly differentiate from sibling tools like 'get_movie_recommendations' or 'get_random_movie', which would require a 5.

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 is provided on when to use this tool versus alternatives like 'get_movie_recommendations' or 'get_random_movie'. The description implies usage for searching by title but 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/sudhish/indian-movies-mcp'

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