Skip to main content
Glama
hlydecker
by hlydecker

list_genark_genomes

Retrieve available genome assemblies from UCSC's GenArk database or verify if a specific genome exists for genomic analysis and research.

Instructions

List UCSC Genome Browser database genomes from assembly hub host (GenArk). Can also test for existence of a specific genome.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
genomeNoSpecific genome to test for existence (optional)
max_itemsNoMaximum number of items to return (default: 1000000)

Implementation Reference

  • Handler for the 'list_genark_genomes' tool. Builds API request to '/list/genarkGenomes' endpoint with optional 'genome' and 'max_items' parameters, fetches data from UCSC GenArk host, and returns JSON response.
    elif name == "list_genark_genomes": params = { "genome": arguments.get("genome"), "maxItemsOutput": arguments.get("max_items") } url = build_api_url("/list/genarkGenomes", params) result = await make_api_request(url)
  • Tool registration in list_tools(), including name, description, and input schema definition for 'list_genark_genomes'.
    Tool( name="list_genark_genomes", description="List UCSC Genome Browser database genomes from assembly hub host (GenArk). Can also test for existence of a specific genome.", inputSchema={ "type": "object", "properties": { "genome": { "type": "string", "description": "Specific genome to test for existence (optional)" }, "max_items": { "type": "integer", "description": "Maximum number of items to return (default: 1000000)" } } } ),
  • Input schema defining parameters for the 'list_genark_genomes' tool: optional genome (string) and max_items (integer).
    inputSchema={ "type": "object", "properties": { "genome": { "type": "string", "description": "Specific genome to test for existence (optional)" }, "max_items": { "type": "integer", "description": "Maximum number of items to return (default: 1000000)" } } }
  • Helper function build_api_url used by the handler to construct the UCSC API URL with semicolon-separated parameters.
    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 make_api_request used by the handler to perform asynchronous HTTP GET request and parse JSON response.
    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