get_countries
Retrieve a complete list of countries from IMDb's database for filtering or reference purposes in media analysis.
Instructions
Get all countries. Returns: JSON object containing all countries.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/imdb_mcp_server/tools.py:173-183 (handler)The handler function for the 'get_countries' tool. It makes an API request to the IMDb countries endpoint, handles the response, and returns the countries data as a JSON string.@mcp.tool() async def get_countries(ctx: Context) -> str: """Get all countries. Returns: JSON object containing all countries. """ countries_url = f"{BASE_URL}/countries" countries_data = await make_imdb_request(countries_url, {}, ctx) if not countries_data: return "Unable to fetch countries data." return json.dumps(countries_data, indent=4)