Skip to main content
Glama
hlydecker
by hlydecker

list_hub_genomes

Retrieve all genomes available in a specified track or assembly hub to identify compatible genomic datasets for analysis.

Instructions

List all genomes available in a specified track or assembly hub.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hub_urlYesURL of the track hub or assembly hub

Implementation Reference

  • Handler logic for 'list_hub_genomes' tool: constructs parameters from input, builds UCSC API URL for /list/hubGenomes endpoint, and makes the API request.
    elif name == "list_hub_genomes": params = {"hubUrl": arguments["hub_url"]} url = build_api_url("/list/hubGenomes", params) result = await make_api_request(url)
  • Input schema definition for 'list_hub_genomes' tool: requires 'hub_url' string parameter.
    inputSchema={ "type": "object", "properties": { "hub_url": { "type": "string", "description": "URL of the track hub or assembly hub" } }, "required": ["hub_url"] }
  • Registration of the 'list_hub_genomes' tool in the MCP server's list_tools() function, including name, description, and input schema.
    Tool( name="list_hub_genomes", description="List all genomes available in a specified track or assembly hub.", inputSchema={ "type": "object", "properties": { "hub_url": { "type": "string", "description": "URL of the track hub or assembly hub" } }, "required": ["hub_url"] } ),
  • Helper function to build UCSC API URLs with semicolon-separated parameters, used by the tool 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 make asynchronous HTTP GET requests to UCSC API and parse JSON response, used by the tool 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