get_country_codes_for_upcoming_releases
Retrieve country codes to filter upcoming movie and TV releases on IMDb by geographic availability.
Instructions
Get the available country codes for upcoming releases from IMDb. Returns: JSON object containing the available country codes for upcoming releases.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/imdb_mcp_server/tools.py:297-307 (handler)The main handler function decorated with @mcp.tool(), which fetches available country codes for upcoming releases from the IMDb API endpoint '/upcoming-releases-country-codes' using the make_imdb_request helper and returns the JSON-formatted data or an error message.@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)