Skip to main content
Glama
hlydecker

UCSC Genome Browser MCP Server

by hlydecker

find_genome

Search for genomes in the UCSC Genome Browser using advanced filters like species, assembly level, and availability to locate specific genomic assemblies for research.

Instructions

Search for a genome in the UCSC browser using a search string. Supports advanced search with +word (force inclusion), -word (exclusion), and word* (wildcard).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch string to find genomes (e.g., 'dog', 'GRCh38', 'GCF_028858775.2')
browserNoFilter by browser availability (default: mustExist)
stats_onlyNoOnly show statistics about search results
yearNoFilter results by year
categoryNoFilter by NCBI category
statusNoFilter by NCBI status
levelNoFilter by NCBI assembly level
max_itemsNoMaximum number of items to return (default: 1000000, use -1 for max)

Implementation Reference

  • Executes the find_genome tool by mapping input arguments to API parameters, building the UCSC /findGenome API URL, making an asynchronous HTTP request, and returning the JSON result.
    if name == "find_genome":
        params = {
            "q": arguments["query"],
            "browser": arguments.get("browser"),
            "statsOnly": 1 if arguments.get("stats_only") else None,
            "year": arguments.get("year"),
            "category": arguments.get("category"),
            "status": arguments.get("status"),
            "level": arguments.get("level"),
            "maxItemsOutput": arguments.get("max_items")
        }
        url = build_api_url("/findGenome", params)
        result = await make_api_request(url)
  • Input schema defining parameters for the find_genome tool, including query (required), optional filters like browser, stats_only, year, category, status, level, and max_items.
    inputSchema={
        "type": "object",
        "properties": {
            "query": {
                "type": "string",
                "description": "Search string to find genomes (e.g., 'dog', 'GRCh38', 'GCF_028858775.2')"
            },
            "browser": {
                "type": "string",
                "enum": ["mustExist", "mayExist", "notExist"],
                "description": "Filter by browser availability (default: mustExist)"
            },
            "stats_only": {
                "type": "boolean",
                "description": "Only show statistics about search results"
            },
            "year": {
                "type": "integer",
                "description": "Filter results by year"
            },
            "category": {
                "type": "string",
                "enum": ["reference", "representative"],
                "description": "Filter by NCBI category"
            },
            "status": {
                "type": "string",
                "enum": ["reference", "representative"],
                "description": "Filter by NCBI status"
            },
            "level": {
                "type": "string",
                "enum": ["complete", "chromosome", "scaffold", "contig"],
                "description": "Filter by NCBI assembly level"
            },
            "max_items": {
                "type": "integer",
                "description": "Maximum number of items to return (default: 1000000, use -1 for max)"
            }
        },
        "required": ["query"]
  • Registers the find_genome tool with the MCP server in the list_tools() function, specifying name, description, and input schema.
    Tool(
        name="find_genome",
        description="Search for a genome in the UCSC browser using a search string. Supports advanced search with +word (force inclusion), -word (exclusion), and word* (wildcard).",
        inputSchema={
            "type": "object",
            "properties": {
                "query": {
                    "type": "string",
                    "description": "Search string to find genomes (e.g., 'dog', 'GRCh38', 'GCF_028858775.2')"
                },
                "browser": {
                    "type": "string",
                    "enum": ["mustExist", "mayExist", "notExist"],
                    "description": "Filter by browser availability (default: mustExist)"
                },
                "stats_only": {
                    "type": "boolean",
                    "description": "Only show statistics about search results"
                },
                "year": {
                    "type": "integer",
                    "description": "Filter results by year"
                },
                "category": {
                    "type": "string",
                    "enum": ["reference", "representative"],
                    "description": "Filter by NCBI category"
                },
                "status": {
                    "type": "string",
                    "enum": ["reference", "representative"],
                    "description": "Filter by NCBI status"
                },
                "level": {
                    "type": "string",
                    "enum": ["complete", "chromosome", "scaffold", "contig"],
                    "description": "Filter by NCBI assembly level"
                },
                "max_items": {
                    "type": "integer",
                    "description": "Maximum number of items to return (default: 1000000, use -1 for max)"
                }
            },
            "required": ["query"]
        }
    ),
  • Helper function to construct UCSC API URLs from endpoint and parameters, filtering None values and using semicolon-separated params.
    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 asynchronous HTTP GET request to UCSC API URL 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()
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions search capabilities and syntax but lacks critical details like authentication requirements, rate limits, pagination behavior, error handling, or what the output looks like (e.g., format, structure). For a search tool with 8 parameters, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured in two sentences: the first states the core purpose, and the second details advanced search syntax. Every word contributes directly to understanding the tool's functionality, with no wasted text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex search tool with 8 parameters, no annotations, and no output schema, the description is incomplete. It lacks information on behavioral traits (e.g., performance, limits), output format, and usage context relative to siblings. The agent would struggle to use this effectively without additional context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 8 parameters. The description adds minimal value by mentioning advanced search syntax (+word, -word, word*), which relates to the 'query' parameter but doesn't provide additional semantic context beyond what's in the schema. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Search for a genome'), target resource ('in the UCSC browser'), and method ('using a search string'), distinguishing it from sibling tools like list_ucsc_genomes or search_genome by focusing on search functionality with advanced operators.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like search_genome or list_ucsc_genomes. The description mentions advanced search features but doesn't specify use cases or exclusions, leaving the agent without contextual direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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

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