Skip to main content
Glama
hlydecker
by hlydecker

list_public_hubs

Retrieve all publicly available track hubs from the UCSC Genome Browser to access organized genomic datasets for research and analysis.

Instructions

List all available public track hubs in the UCSC Genome Browser.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler code within the @app.call_tool() dispatcher that constructs the UCSC API URL for /list/publicHubs and fetches the list of public track hubs.
    elif name == "list_public_hubs": url = build_api_url("/list/publicHubs", {}) result = await make_api_request(url)
  • Tool registration in @app.list_tools(), defining the tool name, description, and empty input schema.
    Tool( name="list_public_hubs", description="List all available public track hubs in the UCSC Genome Browser.", inputSchema={ "type": "object", "properties": {} } ),
  • Input schema definition for the tool, which requires no parameters.
    inputSchema={ "type": "object", "properties": {} }
  • Helper function to construct UCSC API URLs, used by the list_public_hubs handler.
    def build_api_url(endpoint: str, params: dict[str, Any]) -> str: """Build the complete API URL with parameters.""" # Filter out None values filtered_params = {k: v for k, v in params.items() if v is not None} # Convert parameters to URL format (using semicolons as per UCSC API spec) if filtered_params: param_str = ";".join(f"{k}={v}" for k, v in filtered_params.items()) return f"{BASE_URL}{endpoint}?{param_str}" return f"{BASE_URL}{endpoint}"
  • Helper function to perform HTTP GET requests to UCSC API and parse JSON response, used by the handler.
    async def make_api_request(url: str) -> dict[str, Any]: """Make an HTTP request to the UCSC API and return JSON response.""" async with httpx.AsyncClient(timeout=30.0) as client: response = await client.get(url) response.raise_for_status() return response.json()

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/hlydecker/ucsc-genome-mcp'

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