list_all_attributes
Retrieve a filtered list of all attributes for a specified dataset in Biomart MCP, excluding less common attributes like homologs and microarray probes, returned in CSV format. Use to explore dataset characteristics efficiently.
Instructions
Lists all available attributes for a given dataset with some filtering.
This function returns a filtered list of all attributes available for the specified
dataset. Some less commonly used attributes (homologs, microarray probes) are
filtered out to reduce the response size.
CAUTION: This function can return a large number of attributes and may be unstable
for certain datasets. Consider using list_common_attributes first.
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 filtered attributes.
Example:
list_all_attributes("ENSEMBL_MART_ENSEMBL", "hsapiens_gene_ensembl")
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dataset | Yes | ||
| mart | Yes |
Implementation Reference
- biomart-mcp.py:149-177 (handler)The handler function for the 'list_all_attributes' MCP tool. Decorated with @mcp.tool() for automatic registration and schema inference from type hints and docstring. Lists filtered attributes for a Biomart dataset and returns as CSV.@mcp.tool() def list_all_attributes(mart: str, dataset: str): """ Lists all available attributes for a given dataset with some filtering. This function returns a filtered list of all attributes available for the specified dataset. Some less commonly used attributes (homologs, microarray probes) are filtered out to reduce the response size. CAUTION: This function can return a large number of attributes and may be unstable for certain datasets. Consider using list_common_attributes first. 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 filtered attributes. Example: list_all_attributes("ENSEMBL_MART_ENSEMBL", "hsapiens_gene_ensembl") """ server = pybiomart.Server(host=DEFAULT_HOST) df = server[mart][dataset].list_attributes() df = df[~df["name"].str.contains("_homolog_", na=False)] df = df[~df["name"].str.contains("dbass", na=False)] df = df[~df["name"].str.contains("affy_", na=False)] df = df[~df["name"].str.contains("agilent_", na=False)] return df.to_csv(index=False).replace("\r", "")