Skip to main content
Glama

get_languages

Retrieve all available language data from the IMDb database to support content localization and accessibility requirements.

Instructions

Get all languages. Returns: JSON object containing all languages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_languages' tool. It makes a request to the IMDb API's /languages endpoint using make_imdb_request, handles empty response, and returns the JSON data.
    @mcp.tool() async def get_languages(ctx: Context) -> str: """Get all languages. Returns: JSON object containing all languages. """ languages_url = f"{BASE_URL}/languages" languages_data = await make_imdb_request(languages_url, {}, ctx) if not languages_data: return "Unable to fetch languages data." return json.dumps(languages_data, indent=4)
  • The @mcp.tool() decorator registers the get_languages function as an MCP tool within the register_tools function.
    @mcp.tool()
  • Calls register_tools(server) to register all tools including get_languages.
    register_tools(server)

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/uzaysozen/imdb-mcp-server'

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