Skip to main content
Glama
zazencodes

Public APIs MCP

by zazencodes

get_public_api_details

Retrieve comprehensive details about a specific public API using its unique identifier to understand functionality, endpoints, and usage requirements.

Instructions

Get detailed information about a specific API by its unique public-apis-mcp server ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • The core handler function for the 'get_public_api_details' tool. It retrieves detailed API information from the indexed catalog by ID, raising an error if not found.
    @mcp.tool
    def get_public_api_details(id: str) -> ApiItem:
        """Get detailed information about a specific API by its
        unique public-apis-mcp server ID
        """
        items, by_id = load_catalog_indexed()
        item = by_id.get(id)
        if not item:
            raise ValueError(f"API id not found: {id}")
        return item
  • Pydantic model defining the output schema (ApiItem) returned by the get_public_api_details tool.
    class ApiItem(BaseModel):
        id: str
        api: str = Field(description="API display name")
        api_link: str
        description: str
        auth: str | None = None
        https: str | bool | None = None
        cors: str | None = None
        category: str | None = None
  • Registration of tools (including get_public_api_details) to the FastMCP server instance via register_tools(mcp).
    def create_server() -> FastMCP:
        mcp = FastMCP(name="free-api-mcp")
        register_tools(mcp)
        register_resources(mcp)
        return mcp
  • The register_tools function where the @mcp.tool decorator registers the get_public_api_details handler.
    def register_tools(mcp: FastMCP) -> None:
        @mcp.tool
Install Server

Other Tools

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/zazencodes/public-apis-mcp'

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