Skip to main content
Glama
biocontext-ai

BioContextAI Knowledgebase MCP

Official

bc_get_human_protein_atlas_info

Retrieve detailed protein information, genetic constraints, and target tractability data from the Human Protein Atlas using Ensembl gene IDs or gene symbols with this query tool.

Instructions

Query the Human Protein Atlas API for target general information, genetic constraint, and tractability.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gene_idYesThe Ensembl gene ID (e.g., 'ENSG00000141510')
gene_symbolYesThe gene name (e.g., 'TP53')

Implementation Reference

  • Handler function decorated with @core_mcp.tool() that implements the logic to fetch Human Protein Atlas info by gene_id or gene_symbol, resolving gene_symbol to gene_id if needed using another tool.
    @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}"}
  • Input schema defined using Annotated and pydantic Field for gene_id and gene_symbol parameters.
    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:
  • Creation of the FastMCP server instance 'core_mcp' with prefix 'BC', which registers all @core_mcp.tool() decorated functions as tools. Tool names likely prefixed with 'bc_' due to server name.
    core_mcp = FastMCP( # type: ignore "BC", instructions="Provides access to biomedical knowledge bases.", )
  • Exposes the tool handler function for import, triggering registration via decorator when imported.
    from ._get_human_protein_atlas_info import get_human_protein_atlas_info __all__ = [ "get_human_protein_atlas_info", ]
  • Imports all from proteinatlas module, ensuring the tool is loaded and registered in the core_mcp server.
    from .proteinatlas import *

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

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