Skip to main content
Glama

list_marts

Retrieve a CSV-formatted list of all available Biomart databases from Ensembl, including their display names and descriptions, to explore biological datasets and their attributes.

Instructions

Lists all available Biomart marts (databases) from Ensembl.

Biomart organizes biological data in a hierarchy: MART -> DATASET -> ATTRIBUTES/FILTERS.
This function returns all available marts as a CSV string.

Returns:
    str: CSV-formatted table of all marts with their display names and descriptions.

Example:
    list_marts()
    >>> "name,display_name,description
         ENSEMBL_MART_ENSEMBL,Ensembl Genes,Gene annotation from Ensembl
         ENSEMBL_MART_MOUSE,Mouse strains,Strain-specific data for mouse
         ..."

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function decorated with @mcp.tool() that implements the list_marts tool logic: connects to Biomart server, retrieves list of marts, and returns as CSV string with error handling.
    @mcp.tool()
    def list_marts():
        """
        Lists all available Biomart marts (databases) from Ensembl.
    
        Biomart organizes biological data in a hierarchy: MART -> DATASET -> ATTRIBUTES/FILTERS.
        This function returns all available marts as a CSV string.
    
        Returns:
            str: CSV-formatted table of all marts with their display names and descriptions.
    
        Example:
            list_marts()
            >>> "name,display_name,description
                 ENSEMBL_MART_ENSEMBL,Ensembl Genes,Gene annotation from Ensembl
                 ENSEMBL_MART_MOUSE,Mouse strains,Strain-specific data for mouse
                 ..."
        """
        try:
            server = get_server()
            return server.list_marts().to_csv(index=False).replace("\r", "")
        except Exception as e:
            print(f"Error listing marts: {str(e)}", file=sys.stderr)
            return f"Error: {str(e)}"
  • Cached helper function used by list_marts (and other tools) to create and return the pybiomart Server connection.
    @lru_cache()
    def get_server():
        """Create and cache a server connection with error handling"""
        try:
            return pybiomart.Server(host=DEFAULT_HOST)
        except Exception as e:
            print(f"Error connecting to Biomart server: {str(e)}", file=sys.stderr)
            raise
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing key behavioral traits: it returns a CSV string (not a structured object), provides the exact format of the output including column names, and includes a concrete example showing the structure of returned data. It doesn't mention performance characteristics like rate limits.

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 perfectly structured: first sentence states the purpose, second explains the context/hierarchy, third describes the return format, and fourth provides a concrete example. Every sentence adds value with zero wasted words, and the information is appropriately front-loaded.

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

Completeness4/5

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

For a parameterless tool with no annotations and no output schema, the description provides excellent coverage: purpose, context, return format, and example. The only minor gap is the lack of explicit error handling or edge case information, but for this simple tool, the description is nearly complete.

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

Parameters4/5

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

With 0 parameters and 100% schema coverage, the baseline would be 4. The description appropriately notes there are no parameters by showing 'list_marts()' in the example and doesn't attempt to add unnecessary parameter information, which is correct for a parameterless tool.

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 ('Lists all available Biomart marts') and resource ('from Ensembl'), distinguishing it from siblings like list_datasets or list_filters by focusing on the mart level of the Biomart hierarchy. It provides a concrete example of what the tool returns.

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

Usage Guidelines4/5

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

The description implicitly provides usage context by explaining the Biomart hierarchy (MART -> DATASET -> ATTRIBUTES/FILTERS), suggesting this tool should be used first to identify marts before accessing datasets or attributes. However, it doesn't explicitly state when to use alternatives like list_datasets or list_filters.

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

Related 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/jzinno/biomart-mcp'

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