Skip to main content
Glama
biocontext-ai

BioContextAI Knowledgebase MCP

Official

bc_get_panglaodb_options

Retrieve available filter options for PanglaoDB marker genes, including unique organ and cell type values to refine biological data queries.

Instructions

Retrieve available filter options for PanglaoDB marker genes. Returns unique values for organs and cell types.

Returns: dict: Lists of unique organ and cell_type values available in PanglaoDB dataset or error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary handler function for the get_panglaodb_options tool (likely referred to as bc_get_panglaodb_options externally). It fetches unique organ and cell_type filter options from the PanglaoDB dataset using a helper function.
    @core_mcp.tool()
    def get_panglaodb_options() -> Dict[str, List[str] | str]:
        """Retrieve available filter options for PanglaoDB marker genes. Returns unique values for organs and cell types.
    
        Returns:
            dict: Lists of unique organ and cell_type values available in PanglaoDB dataset or error message.
        """
        panglao_db_df = get_panglaodb_df()
        if panglao_db_df is None:
            return {"error": "PanglaoDB data is not loaded. Check server logs."}
    
        # Get unique values for each column, handling NaN values
        organ = panglao_db_df["organ"].dropna().str.lower().unique().tolist()
        cell_type = panglao_db_df["cell type"].dropna().str.lower().unique().tolist()
    
        return {
            "organ": organ,
            "cell_type": cell_type,
        }
  • Supporting helper function that loads the PanglaoDB marker genes TSV file into a pandas DataFrame, used by the main handler.
    def get_panglaodb_df() -> pd.DataFrame | None:
        """Load the PanglaoDB dataset into a pandas DataFrame.
    
        Returns:
            pd.DataFrame | None: The loaded DataFrame or None if loading fails.
        """
        # Construct the path to the TSV file
        panglao_db_path = Path(__file__).parent / "data" / "PanglaoDB_markers_27_Mar_2020.tsv"
    
        # Load the database into a pandas DataFrame
        try:
            panglao_db_df = pd.read_csv(panglao_db_path, sep="\t", engine="python", header=0)
            # Replace empty strings and other potential non-values with NaN for consistency
            panglao_db_df = panglao_db_df.replace("", pd.NA)
            return panglao_db_df
        except FileNotFoundError:
            print(f"Error: PanglaoDB file not found at {panglao_db_path}")
            return None
        except Exception as e:
            print(f"Error loading PanglaoDB file: {e}")
            return None
  • Import statement in core/__init__.py that triggers the import and registration of panglaodb tools via their decorators when the module is loaded.
    from .panglaodb import *
  • Re-exports the tool handler function, allowing it to be imported and registered via panglaodb.__init__.
    from ._get_panglaodb_options import get_panglaodb_options
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions the return type (dict with lists of unique values or an error message), which adds some behavioral context. However, it lacks details on potential errors, rate limits, authentication needs, or data freshness, which are important for a tool with no annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose in the first sentence, followed by return details. It is efficient with two sentences, though the second sentence could be integrated more smoothly. There is minimal waste, but slight room for improvement in flow.

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 0 parameters, an output schema (implied by 'Returns: dict'), and no annotations, the description is reasonably complete. It explains what the tool does and the return format, though it could benefit from more behavioral context (e.g., error conditions) to fully compensate for the lack of annotations.

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?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description does not add parameter semantics, but this is acceptable given the lack of parameters. A baseline of 4 is appropriate as it compensates by clearly stating the tool's function without unnecessary details.

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 ('Retrieve available filter options') and resource ('PanglaoDB marker genes'), distinguishing it from sibling tools like 'bc_get_panglaodb_marker_genes' which likely retrieves the actual data rather than filter options. The purpose is precise and unambiguous.

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

Usage Guidelines3/5

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

The description implies usage context by specifying it returns filter options for PanglaoDB marker genes, suggesting it should be used when needing to know available organs and cell types for filtering. However, it does not explicitly state when to use this tool versus alternatives (e.g., before querying 'bc_get_panglaodb_marker_genes') or any exclusions, leaving some ambiguity.

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

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/biocontext-ai/knowledgebase-mcp'

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