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

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