Skip to main content
Glama

get_now_showing

Find movies currently playing in your area by entering your city or ZIP code to see available showtimes and film listings.

Instructions

Returns a list of movies currently showing in a given city or ZIP code.

Args: location: City, state or ZIP code (e.g., "Boston, MA")

Returns: JSON string with list of movies

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
locationYes

Implementation Reference

  • Main handler for 'get_now_showing' tool in standard MCP server implementation. Retrieves and formats mock movie data for the specified location.
    async def _get_now_showing(self, args: Dict[str, Any]) -> CallToolResult: """Get movies currently showing in a location""" location = args.get("location", "") # Filter movies by location (simplified - match any theater in the area) showing_movies = [] for movie in self.movies.values(): # Simple mock logic - show all movies for any location movie_data = { "movie_id": movie.movie_id, "title": movie.title, "rating": movie.rating, "duration": movie.duration, "genre": movie.genre, "description": movie.description } showing_movies.append(movie_data) result = { "location": location, "movies": showing_movies[:10] # Limit to 10 movies } return CallToolResult( content=[TextContent(type="text", text=json.dumps(result, indent=2))] )
  • Registration of the 'get_now_showing' tool including name, description, and input schema in the list_tools handler.
    Tool( name="get_now_showing", description="Returns a list of movies currently showing in a given city or ZIP code", inputSchema={ "type": "object", "properties": { "location": {"type": "string", "description": "City, state or ZIP code"} }, "required": ["location"] } ),
  • Handler and registration for 'get_now_showing' tool in FastMCP implementation, delegates to helper function.
    @mcp.tool() def get_now_showing(location: str) -> str: """ Returns a list of movies currently showing in a given city or ZIP code. Args: location: City, state or ZIP code (e.g., "Boston, MA") Returns: JSON string with list of movies """ return _get_now_showing(location)
  • Helper function containing the core logic for fetching currently showing movies using global mock data.
    def _get_now_showing(location: str) -> str: """ Returns a list of movies currently showing in a given city or ZIP code. Args: location: City, state or ZIP code (e.g., "Boston, MA") Returns: JSON string with list of movies """ showing_movies = [] for movie in movies.values(): movie_data = { "movie_id": movie.movie_id, "title": movie.title, "rating": movie.rating, "duration": movie.duration, "genre": movie.genre, "description": movie.description } showing_movies.append(movie_data) result = { "location": location, "movies": showing_movies[:10] } return json.dumps(result, indent=2)

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/hi5d/amc-mcp'

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