get_upcoming_indian_movies
Retrieve upcoming Indian movies from IMDb based on real-time popularity data. Specify a starting index to get 5 anticipated films for tracking releases and planning viewing.
Instructions
Get the most anticipated Indian movies on IMDb based on real-time popularity. Args: start: The starting index (0-based) to retrieve movies from. Returns: JSON object containing 5 most anticipated Indian movies starting from the specified index.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| start | Yes |
Input Schema (JSON Schema)
{
"properties": {
"start": {
"title": "Start",
"type": "integer"
}
},
"required": [
"start"
],
"type": "object"
}
Implementation Reference
- src/imdb_mcp_server/tools.py:330-342 (handler)The handler function that implements the get_upcoming_indian_movies tool. It fetches data from the IMDb API endpoint for upcoming Indian movies, handles errors, paginates the results, and returns them as formatted JSON.@mcp.tool() async def get_upcoming_indian_movies(start: int, ctx: Context) -> str: """Get the most anticipated Indian movies on IMDb based on real-time popularity. Args: start: The starting index (0-based) to retrieve movies from. Returns: JSON object containing 5 most anticipated Indian movies starting from the specified index. """ upcoming_indian_movies_url = f"{BASE_URL}/india/upcoming" upcoming_indian_movies_data = await make_imdb_request(upcoming_indian_movies_url, {}, ctx) if not upcoming_indian_movies_data: return "Unable to fetch upcoming Indian movies data." return json.dumps(paginated_response(upcoming_indian_movies_data, start, len(upcoming_indian_movies_data)), indent=4)
- src/imdb_mcp_server/main.py:23-23 (registration)The call to register_tools(server) in the server creation function, which registers all MCP tools including get_upcoming_indian_movies via their decorators.register_tools(server)
- src/imdb_mcp_server/main.py:61-61 (registration)The call to register_tools(server) in stdio mode, registering the tool.register_tools(server)