Skip to main content
Glama

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
NameRequiredDescriptionDefault
datasetYes
martYes

Implementation Reference

  • 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", "")
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well by disclosing key behavioral traits: it warns that the function 'can return a large number of attributes and may be unstable for certain datasets', specifies that it filters out 'homologs, microarray probes', and notes the output format as CSV. This covers performance, stability, and output behavior beyond basic functionality.

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 well-structured and front-loaded: the first sentence states the purpose, followed by details on filtering, cautions, and usage advice. Each sentence adds value without redundancy, and it includes a helpful example at the end.

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?

Given the tool has 2 parameters, no annotations, and no output schema, the description is quite complete: it explains purpose, parameters, behavior, cautions, and alternatives. However, it doesn't detail error conditions or exact filtering criteria beyond examples, leaving minor gaps for a tool with potential instability.

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

Parameters5/5

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

The schema description coverage is 0%, so the description must compensate fully. It does so by explaining both parameters: 'mart' as 'The mart identifier' with an example, and 'dataset' as 'The dataset identifier' with an example. This adds essential meaning beyond the bare schema.

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 tool 'lists all available attributes for a given dataset with some filtering' and specifies it returns a filtered list. It distinguishes from the sibling 'list_common_attributes' by mentioning that tool as an alternative. However, it doesn't fully differentiate from other siblings like 'list_filters' or 'list_datasets' in terms of resource scope.

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

Usage Guidelines5/5

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

The description provides explicit usage guidance: it advises to 'consider using list_common_attributes first' due to potential instability and large response sizes, and it mentions filtering out less commonly used attributes. This gives clear context on when to use this tool versus alternatives.

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