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
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes |
Implementation Reference
- src/public_apis_mcp/tools.py:34-43 (handler)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
- src/public_apis_mcp/types.py:6-15 (schema)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
- src/public_apis_mcp/server.py:9-13 (registration)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
- src/public_apis_mcp/tools.py:11-12 (registration)The register_tools function where the @mcp.tool decorator registers the get_public_api_details handler.def register_tools(mcp: FastMCP) -> None: @mcp.tool