Skip to main content
Glama
hi5d
by hi5d

get_showtimes

Find available movie showtimes by specifying a movie ID, date, and location to retrieve schedule information for AMC Theatres.

Instructions

Fetches available showtimes for a specific movie and location.

Args: movie_id: Movie ID (e.g., "mv001") date: Date in YYYY-MM-DD format (e.g., "2025-10-28") location: City, state or ZIP code

Returns: JSON string with available showtimes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
movie_idYes
dateYes
locationYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Core handler logic for the get_showtimes tool in FastMCP implementation, filters showtimes by movie_id and date from global mock data.
    def _get_showtimes(movie_id: str, date: str, location: str) -> str:
        """Internal implementation of get_showtimes"""
        if not movie_id or movie_id not in movies:
            return json.dumps({"error": "Invalid movie ID"})
        
        movie = movies[movie_id]
        showtime_list = []
        
        for showtime in showtimes.values():
            if showtime.movie_id == movie_id and showtime.date == date:
                theater = theaters.get(showtime.theater_id)
                if theater:
                    showtime_list.append({
                        "showtime_id": showtime.showtime_id,
                        "theater_name": theater.name,
                        "theater_address": theater.address,
                        "time": showtime.time,
                        "format": showtime.format,
                        "price": showtime.price
                    })
        
        result = {
            "movie": {"id": movie.movie_id, "title": movie.title},
            "date": date,
            "location": location,
            "showtimes": showtime_list
        }
        
        return json.dumps(result, indent=2)
  • FastMCP tool decorator registration for get_showtimes, including docstring parameters and delegation to internal handler.
    def get_showtimes(movie_id: str, date: str, location: str) -> str:
        """
        Fetches available showtimes for a specific movie and location.
        
        Args:
            movie_id: Movie ID (e.g., "mv001")
            date: Date in YYYY-MM-DD format (e.g., "2025-10-28")
            location: City, state or ZIP code
        
        Returns:
            JSON string with available showtimes
        """
        return _get_showtimes(movie_id, date, location)
  • Input schema and metadata for get_showtimes tool defined in the list_tools handler.
    Tool(
        name="get_showtimes",
        description="Fetches available showtimes for a specific movie and location",
        inputSchema={
            "type": "object",
            "properties": {
                "movie_id": {"type": "string", "description": "Movie ID"},
                "date": {"type": "string", "description": "Date in YYYY-MM-DD format"},
                "location": {"type": "string", "description": "City, state or ZIP code"}
            },
            "required": ["movie_id", "date", "location"]
        }
    ),
  • Async handler method for executing get_showtimes tool in standard MCP server implementation, similar logic to FastMCP version.
    async def _get_showtimes(self, args: Dict[str, Any]) -> CallToolResult:
        """Get showtimes for a movie on a specific date and location"""
        movie_id = args.get("movie_id")
        date = args.get("date")
        location = args.get("location")
        
        if not movie_id or movie_id not in self.movies:
            return CallToolResult(
                content=[TextContent(type="text", text=json.dumps({"error": "Invalid movie ID"}))]
            )
        
        movie = self.movies[movie_id]
        showtimes = []
        
        for showtime in self.showtimes.values():
            if showtime.movie_id == movie_id and showtime.date == date:
                theater = self.theaters.get(showtime.theater_id)
                if theater:
                    showtimes.append({
                        "showtime_id": showtime.showtime_id,
                        "theater_name": theater.name,
                        "theater_address": theater.address,
                        "time": showtime.time,
                        "format": showtime.format,
                        "price": showtime.price
                    })
        
        result = {
            "movie": {"id": movie.movie_id, "title": movie.title},
            "date": date,
            "location": location,
            "showtimes": showtimes
        }
        
        return CallToolResult(
            content=[TextContent(type="text", text=json.dumps(result, indent=2))]
        )
  • Dispatch logic in call_tool handler that routes get_showtimes requests to the specific handler method.
    elif request.name == "get_showtimes":
        return await self._get_showtimes(request.arguments)
Behavior2/5

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

With no annotations provided, the description carries full burden but only states it 'fetches' data without disclosing behavioral traits like authentication requirements, rate limits, error handling, or whether this is a read-only operation. It mentions the return format but lacks operational context.

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?

The description is appropriately sized and front-loaded with the core purpose in the first sentence. The Args/Returns sections are structured but slightly verbose; every sentence earns its place by clarifying parameters and output.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (3 required parameters) and the presence of an output schema (which handles return values), the description is reasonably complete. It covers purpose and parameters well but lacks behavioral context that would be needed without annotations.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate fully. It successfully adds meaning beyond the bare schema by explaining each parameter's purpose (movie ID, date format, location type) with concrete examples, making the semantics clear despite no schema descriptions.

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 tool's purpose with specific verb ('fetches') and resource ('available showtimes'), and distinguishes it from siblings by focusing on movie/location/date filtering rather than booking, recommendations, or payments.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context (when you need showtimes for a specific movie, date, and location) but doesn't explicitly state when to use this versus alternatives like get_now_showing (which likely shows currently playing movies without filtering) or provide exclusion guidance.

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

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