Skip to main content
Glama

get_writers

Retrieve the writers of any movie using its IMDb ID. This tool provides JSON data listing all credited writers for the specified film.

Instructions

Get the writers of a movie from IMDb. Args: imdbId: The IMDb ID of the movie to get writers for. Returns: JSON object containing the writers of the movie.

Input Schema

NameRequiredDescriptionDefault
imdb_idYes

Input Schema (JSON Schema)

{ "properties": { "imdb_id": { "title": "Imdb Id", "type": "string" } }, "required": [ "imdb_id" ], "type": "object" }

Implementation Reference

  • The main handler function for the 'get_writers' tool. It is decorated with @mcp.tool() which registers it as an MCP tool. Fetches writers information from the IMDb API endpoint for the given imdb_id and returns the data as formatted JSON.
    @mcp.tool() async def get_writers(imdb_id: str, ctx: Context) -> str: """Get the writers of a movie from IMDb. Args: imdbId: The IMDb ID of the movie to get writers for. Returns: JSON object containing the writers of the movie. """ writers_url = f"{BASE_URL}/{imdb_id}/writers" writers_data = await make_imdb_request(writers_url, {}, ctx) if not writers_data: return "Unable to fetch writers data for this movie or movie not found." return json.dumps(writers_data, indent=4)
  • Calls register_tools(server) within the create_server function, which defines and registers all tools including get_writers via decorators.
    # Register all tools with the server register_tools(server) return server
  • In stdio mode, creates the server and calls register_tools(server) to register all tools including get_writers.
    server = FastMCP("IMDb MCP Server") 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