Skip to main content
Glama
hlydecker

UCSC Genome Browser MCP Server

by hlydecker

list_files

Retrieve available download files for a specific UCSC genome assembly to access genomic data resources.

Instructions

List download files available for a specified UCSC genome assembly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
genomeYesGenome assembly name (e.g., 'hg38', 'mm10')
formatNoOutput format (default: json)
max_itemsNoMaximum number of items to return

Implementation Reference

  • Handler implementation for the 'list_files' tool. Constructs parameters from input arguments and makes an API request to the UCSC Genome Browser's /list/files endpoint.
    elif name == "list_files":
        params = {
            "genome": arguments["genome"],
            "format": arguments.get("format"),
            "maxItemsOutput": arguments.get("max_items")
        }
        url = build_api_url("/list/files", params)
        result = await make_api_request(url)
  • Registration of the 'list_files' tool in the list_tools() function, including name, description, and input schema.
    Tool(
        name="list_files",
        description="List download files available for a specified UCSC genome assembly.",
        inputSchema={
            "type": "object",
            "properties": {
                "genome": {
                    "type": "string",
                    "description": "Genome assembly name (e.g., 'hg38', 'mm10')"
                },
                "format": {
                    "type": "string",
                    "enum": ["json", "text"],
                    "description": "Output format (default: json)"
                },
                "max_items": {
                    "type": "integer",
                    "description": "Maximum number of items to return"
                }
            },
            "required": ["genome"]
        }
    ),
  • Input schema definition for the 'list_files' tool, specifying parameters like genome (required), format, and max_items.
    inputSchema={
        "type": "object",
        "properties": {
            "genome": {
                "type": "string",
                "description": "Genome assembly name (e.g., 'hg38', 'mm10')"
            },
            "format": {
                "type": "string",
                "enum": ["json", "text"],
                "description": "Output format (default: json)"
            },
            "max_items": {
                "type": "integer",
                "description": "Maximum number of items to return"
            }
        },
        "required": ["genome"]
    }
  • Helper function build_api_url used by list_files handler to construct the API request URL.
    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 list_files handler to perform the HTTP GET request and parse JSON.
    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 that files are 'available for download' but doesn't specify whether this is a read-only operation, if it requires authentication, what the return format looks like beyond the format parameter, or any rate limits. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

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 a single, clear sentence that efficiently conveys the core purpose without any wasted words. It's front-loaded with the essential information and appropriately sized for the tool's complexity.

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

Completeness3/5

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

Given the tool's moderate complexity (3 parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on behavioral traits, usage context, and output structure, which would be helpful for an agent to use it effectively.

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?

The schema description coverage is 100%, so all parameters are documented in the schema. The description doesn't add any additional meaning beyond what the schema provides (e.g., it doesn't explain what 'download files' includes or provide examples beyond the schema's enum for format). This meets the baseline for high schema coverage.

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

Purpose4/5

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

The description clearly states the action ('List') and resource ('download files') with a specific scope ('for a specified UCSC genome assembly'), making the purpose immediately understandable. However, it doesn't explicitly differentiate this tool from similar siblings like 'list_tracks' or 'list_chromosomes', which also list resources for genome assemblies.

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?

The description provides no guidance on when to use this tool versus alternatives like 'list_tracks' or 'list_chromosomes', nor does it mention prerequisites or exclusions. It simply states what the tool does without contextual usage information.

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