get_country_codes_for_upcoming_releases
Find available country codes to filter upcoming movie and TV show releases from IMDb data. Use this to identify which regions have scheduled releases.
Instructions
Get the available country codes for upcoming releases from IMDb. Returns: JSON object containing the available country codes for upcoming releases.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"type": "object"
}
Implementation Reference
- src/imdb_mcp_server/tools.py:297-307 (handler)The core handler function implementing the 'get_country_codes_for_upcoming_releases' tool. It queries the IMDb API for available country codes and returns formatted JSON.@mcp.tool() async def get_country_codes_for_upcoming_releases(ctx: Context) -> str: """Get the available country codes for upcoming releases from IMDb. Returns: JSON object containing the available country codes for upcoming releases. """ available_country_codes_url = f"{BASE_URL}/upcoming-releases-country-codes" available_country_codes_data = await make_imdb_request(available_country_codes_url, {}, ctx) if not available_country_codes_data: return "Unable to fetch available country codes for upcoming releases data." return json.dumps(available_country_codes_data, indent=4)
- src/imdb_mcp_server/main.py:23-23 (registration)Invocation of register_tools which defines and registers the tool handler with the FastMCP server instance.register_tools(server)
- src/imdb_mcp_server/main.py:61-61 (registration)Alternative invocation of register_tools for stdio transport mode, registering the tool with the server.register_tools(server)