Skip to main content
Glama
biocontext-ai

BioContextAI Knowledgebase MCP

Official

bc_get_human_protein_atlas_info

Retrieve Human Protein Atlas data including tissue expression, subcellular localization, and pathology information using gene identifiers.

Instructions

Retrieve Human Protein Atlas information including expression, localization, and pathology data. Provide either gene_id or gene_symbol.

Returns: dict: Protein atlas data with tissue_expression, subcellular_location, pathology, antibodies, RNA/protein levels or error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gene_idYesEnsembl gene ID (e.g., 'ENSG00000141510')
gene_symbolYesGene symbol (e.g., 'TP53')

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the tool, decorated with @core_mcp.tool(), which defines the schema via Annotated parameters and implements the logic: resolves Ensembl ID if only gene_symbol provided, fetches JSON from Protein Atlas API.
    @core_mcp.tool()
    def get_human_protein_atlas_info(
        gene_id: Annotated[Optional[str], Field(description="Ensembl gene ID (e.g., 'ENSG00000141510')")],
        gene_symbol: Annotated[Optional[str], Field(description="Gene symbol (e.g., 'TP53')")],
    ) -> dict:
        """Retrieve Human Protein Atlas information including expression, localization, and pathology data. Provide either gene_id or gene_symbol.
    
        Returns:
            dict: Protein atlas data with tissue_expression, subcellular_location, pathology, antibodies, RNA/protein levels or error message.
        """
        if gene_id is None and gene_symbol is None:
            return {"error": "At least one of gene_id or gene_symbol must be provided"}
    
        if gene_id is None:
            # If gene_id is not provided, fetch it using gene_symbol
            gene_id_response = get_ensembl_id_from_gene_symbol.fn(gene_symbol=gene_symbol, species="9606")
            if "ensembl_id" in gene_id_response:
                gene_id = gene_id_response["ensembl_id"]
            else:
                return {"error": "Failed to fetch Ensembl ID from gene name"}
    
        url = f"https://www.proteinatlas.org/{gene_id}.json"
    
        try:
            response = requests.get(url)
            response.raise_for_status()
            return response.json()
        except requests.exceptions.RequestException as e:
            return {"error": f"Failed to fetch Human Protein Atlas info: {e!s}"}
  • Registers the core_mcp server (named 'BC', slugified to 'bc') into the main mcp_app, prefixing its tools with 'bc_' to create 'bc_get_human_protein_atlas_info'.
    for mcp in [core_mcp, *(await get_openapi_mcps())]:
        await mcp_app.import_server(
            mcp,
            slugify(mcp.name),
        )
  • Defines the core_mcp FastMCP instance named 'BC' where the tool is registered via decorator.
    core_mcp = FastMCP(  # type: ignore
        "BC",
        instructions="Provides access to biomedical knowledge bases.",
    )
  • Imports proteinatlas tools into core module, executing the @tool decorator to register get_human_protein_atlas_info on core_mcp.
    from .proteinatlas import *
  • Uses the ensembl tool 'get_ensembl_id_from_gene_symbol' to resolve gene_symbol to Ensembl ID if needed.
    from biocontext_kb.core.ensembl import get_ensembl_id_from_gene_symbol
    
    
    @core_mcp.tool()
    def get_human_protein_atlas_info(
        gene_id: Annotated[Optional[str], Field(description="Ensembl gene ID (e.g., 'ENSG00000141510')")],
        gene_symbol: Annotated[Optional[str], Field(description="Gene symbol (e.g., 'TP53')")],
    ) -> dict:
        """Retrieve Human Protein Atlas information including expression, localization, and pathology data. Provide either gene_id or gene_symbol.
    
        Returns:
            dict: Protein atlas data with tissue_expression, subcellular_location, pathology, antibodies, RNA/protein levels or error message.
        """
        if gene_id is None and gene_symbol is None:
            return {"error": "At least one of gene_id or gene_symbol must be provided"}
    
        if gene_id is None:
            # If gene_id is not provided, fetch it using gene_symbol
            gene_id_response = get_ensembl_id_from_gene_symbol.fn(gene_symbol=gene_symbol, species="9606")
            if "ensembl_id" in gene_id_response:
                gene_id = gene_id_response["ensembl_id"]
            else:
                return {"error": "Failed to fetch Ensembl ID from gene name"}
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does disclose the return format ('dict: Protein atlas data with tissue_expression, subcellular_location, pathology, antibodies, RNA/protein levels or error message'), which is valuable. However, it doesn't mention potential limitations like rate limits, authentication requirements, or what happens when both parameters are provided versus just one, leaving some behavioral aspects unclear.

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 appropriately sized with two sentences: one stating the purpose and parameters, and another detailing the return format. It's front-loaded with the core functionality. While efficient, the second sentence could be slightly more structured, but overall it avoids unnecessary verbosity.

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's moderate complexity (2 parameters, no nested objects), 100% schema coverage, and the presence of an output schema (implied by 'Returns: dict'), the description is reasonably complete. It covers purpose, parameters, and return values. However, with no annotations, it could benefit from more behavioral context (e.g., error handling specifics) to be fully comprehensive.

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

Parameters3/5

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

The schema description coverage is 100%, with both parameters well-documented in the schema itself (gene_id as 'Ensembl gene ID', gene_symbol as 'Gene symbol'). The description adds minimal value beyond this by stating 'Provide either gene_id or gene_symbol', which clarifies the optionality but doesn't provide additional semantic context about parameter usage or interactions.

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 action ('Retrieve'), resource ('Human Protein Atlas information'), and scope ('including expression, localization, and pathology data'). It distinguishes itself from sibling tools by focusing specifically on Human Protein Atlas data retrieval, unlike tools for drug counting, AlphaFold info, antibody data, or other biological databases.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool ('Provide either gene_id or gene_symbol'), which helps differentiate it from tools that might require different identifiers. However, it doesn't explicitly mention when NOT to use it or name specific alternative tools for similar purposes, which prevents a perfect score.

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