Skip to main content
Glama

list_filters

Retrieve a CSV-formatted list of all applicable filters for a specified dataset in Biomart. Use this tool to identify filters that refine query results based on attributes like chromosome, start, and end positions.

Instructions

Lists all available filters for a given dataset. Filters are used to narrow down the results of a Biomart query. This function returns all filters that can be applied to the specified dataset. Args: mart (str): The mart identifier (e.g., "ENSEMBL_MART_ENSEMBL") dataset (str): The dataset identifier (e.g., "hsapiens_gene_ensembl") Returns: str: CSV-formatted table of all filters with their display names and descriptions. Example: list_filters("ENSEMBL_MART_ENSEMBL", "hsapiens_gene_ensembl") >>> "name,description chromosome_name,Chromosome/scaffold name start,Gene start (bp) end,Gene end (bp) ..."

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
datasetYes
martYes

Implementation Reference

  • The handler function for the 'list_filters' MCP tool. It is registered via the @mcp.tool() decorator. The function queries the Biomart server for filters available in the specified dataset and returns them as a CSV string.
    @mcp.tool() def list_filters(mart: str, dataset: str): """ Lists all available filters for a given dataset. Filters are used to narrow down the results of a Biomart query. This function returns all filters that can be applied to the specified dataset. Args: mart (str): The mart identifier (e.g., "ENSEMBL_MART_ENSEMBL") dataset (str): The dataset identifier (e.g., "hsapiens_gene_ensembl") Returns: str: CSV-formatted table of all filters with their display names and descriptions. Example: list_filters("ENSEMBL_MART_ENSEMBL", "hsapiens_gene_ensembl") >>> "name,description chromosome_name,Chromosome/scaffold name start,Gene start (bp) end,Gene end (bp) ..." """ server = pybiomart.Server(host=DEFAULT_HOST) return server[mart][dataset].list_filters().to_csv(index=False).replace("\r", "")

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