Skip to main content
Glama
sudhish

Indian Movies MCP Agent

by sudhish

get_random_movie

Discover a random Indian movie recommendation from Bollywood and regional cinema to help you find something new to watch.

Instructions

Get a random Indian movie recommendation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main handler implementation for the 'get_random_movie' tool in the stdio MCP server. Selects a random index from the indianMovies array, retrieves the movie, logs extensively, and returns the movie details as a JSON string in the tool response content.
    case 'get_random_movie': {
      log('=== EXECUTING get_random_movie TOOL ===');
      log('Processing random movie request...');
      log('Total movies available for random selection:', indianMovies.length);
      
      log('=== GENERATING RANDOM SELECTION ===');
      const randomIndex = Math.floor(Math.random() * indianMovies.length);
      log('Generated random index:', randomIndex);
      log('Index range: 0 to', indianMovies.length - 1);
      
      const randomMovie = indianMovies[randomIndex];
      log('=== RANDOM MOVIE SELECTED ===');
      log('Selected movie:', randomMovie.title);
      log('Movie index:', randomIndex);
      log('Movie details:', JSON.stringify(randomMovie, null, 2));
      
      const response = {
        content: [
          {
            type: 'text',
            text: JSON.stringify(randomMovie, null, 2),
          },
        ],
      };
      
      log('=== SENDING get_random_movie RESPONSE ===');
      log('Response contains movie:', randomMovie.title);
      log('Full random movie response:', JSON.stringify(response, null, 2));
      return response;
    }
  • Concise handler implementation for the 'get_random_movie' tool in the HTTP/SSE MCP server. Directly selects and returns a random movie from indianMovies as JSON.
    case 'get_random_movie': {
      const randomMovie = indianMovies[Math.floor(Math.random() * indianMovies.length)];
      return {
        content: [{ type: 'text', text: JSON.stringify(randomMovie, null, 2) }],
      };
    }
  • Tool schema definition for 'get_random_movie' in the list tools response, indicating no input parameters required.
    {
      name: 'get_random_movie',
      description: 'Get a random Indian movie recommendation',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Tool schema definition for 'get_random_movie' in the HTTP server's list tools response, no input parameters.
    name: 'get_random_movie',
    description: 'Get a random Indian movie recommendation',
    inputSchema: { type: 'object', properties: {} },
  • The indianMovies array containing the database of Indian movies from which the random movie is selected by the handlers.
    const indianMovies = [
      {
        title: "3 Idiots",
        year: 2009,
        genre: ["Comedy", "Drama"],
        language: "Hindi",
        rating: 8.4,
        director: "Rajkumar Hirani",
        description: "Two friends search for their long lost companion while reflecting on their college days."
      },
      {
        title: "Dangal",
        year: 2016,
        genre: ["Biography", "Drama", "Sport"],
        language: "Hindi",
        rating: 8.4,
        director: "Nitesh Tiwari",
        description: "Former wrestler Mahavir Singh trains his daughters to become world-class wrestlers."
      },
      {
        title: "Baahubali 2",
        year: 2017,
        genre: ["Action", "Drama"],
        language: "Telugu",
        rating: 8.2,
        director: "S.S. Rajamouli",
        description: "Shiva discovers his legacy and must save his love and his kingdom."
      },
      {
        title: "Taare Zameen Par",
        year: 2007,
        genre: ["Drama", "Family"],
        language: "Hindi",
        rating: 8.4,
        director: "Aamir Khan",
        description: "An eight-year-old boy is thought to be lazy but actually has dyslexia."
      },
      {
        title: "Zindagi Na Milegi Dobara",
        year: 2011,
        genre: ["Adventure", "Comedy", "Drama"],
        language: "Hindi",
        rating: 8.2,
        director: "Zoya Akhtar",
        description: "Three friends on a bachelor trip discover themselves and their friendship."
      },
      {
        title: "Lagaan",
        year: 2001,
        genre: ["Adventure", "Drama", "Musical"],
        language: "Hindi",
        rating: 8.1,
        director: "Ashutosh Gowariker",
        description: "Villagers accept a challenge from British officers to play cricket to avoid taxes."
      },
      {
        title: "Queen",
        year: 2013,
        genre: ["Comedy", "Drama"],
        language: "Hindi",
        rating: 8.2,
        director: "Vikas Bahl",
        description: "A woman goes on her honeymoon alone and discovers herself."
      },
      {
        title: "Tumhari Sulu",
        year: 2017,
        genre: ["Comedy", "Drama"],
        language: "Hindi",
        rating: 7.1,
        director: "Suresh Triveni",
        description: "A housewife becomes a radio jockey and finds her voice."
      },
      {
        title: "Andhadhun",
        year: 2018,
        genre: ["Crime", "Thriller"],
        language: "Hindi",
        rating: 8.2,
        director: "Sriram Raghavan",
        description: "A blind pianist gets embroiled in multiple murders."
      },
      {
        title: "Kumbakonam Gopals",
        year: 2015,
        genre: ["Comedy"],
        language: "Tamil",
        rating: 7.8,
        director: "PC Shekar",
        description: "A hilarious tale of a small-town family."
      }
    ];
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 tool returns a random Indian movie recommendation but doesn't explain how randomness is implemented, if there are any biases, rate limits, or what the output format looks like. This leaves significant gaps in understanding the tool's behavior beyond its basic purpose.

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's front-loaded with the core functionality, making it easy to parse and understand immediately.

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 tool's simplicity (0 parameters, no annotations, no output schema), the description is minimal but adequate for the basic purpose. However, it lacks details on behavioral aspects like output format, randomness mechanism, or differentiation from siblings, which could help an agent use it more effectively. For a recommendation tool, more context would be beneficial.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, so there are no parameters to document. The description appropriately doesn't discuss parameters, which is correct for this case. A baseline of 4 is applied since no parameter information is needed or provided.

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 ('Get') and resource ('random Indian movie recommendation'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_movie_recommendations' or 'search_movie', which might also provide movie recommendations but with different selection criteria or search capabilities.

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?

The description provides no guidance on when to use this tool versus alternatives like 'get_movie_recommendations' or 'search_movie'. It doesn't specify if this is for quick suggestions, unbiased picks, or when detailed filtering isn't needed, leaving the agent to infer usage context.

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