bc_get_antibody_information
Retrieve detailed antibody specifications including catalog numbers, vendor, clonality, epitope, applications, and target species by providing an Antibody Registry ID.
Instructions
Get detailed antibody information by ID. Retrieves catalog number, vendor, clonality, epitope, applications, and more.
Returns: dict: Antibody details including abId, catalog numbers, vendor, clonality, epitope, applications, target species, isotype, citations or error message.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ab_id | Yes | Antibody Registry ID (e.g., '3643095') |
Implementation Reference
- The core handler function for the 'bc_get_antibody_information' tool (prefixed by 'BC' server name). Fetches detailed antibody information from the Antibody Registry API given an antibody ID.@core_mcp.tool() def get_antibody_information( ab_id: Annotated[str, Field(description="Antibody Registry ID (e.g., '3643095')")], ) -> dict: """Get detailed antibody information by ID. Retrieves catalog number, vendor, clonality, epitope, applications, and more. Returns: dict: Antibody details including abId, catalog numbers, vendor, clonality, epitope, applications, target species, isotype, citations or error message. """ ab_id = ab_id.strip() if not ab_id: return {"error": "Antibody ID cannot be empty."} url = f"https://www.antibodyregistry.org/api/antibodies/{ab_id}" headers = {"accept": "application/json"} try: response = requests.get(url, headers=headers) response.raise_for_status() result = response.json() # API returns an array of antibodies if isinstance(result, list): if len(result) > 0: # Return the first item from the array return result[0] else: return {"error": f"No data found for antibody ID: {ab_id}"} else: return {"error": "Unexpected result format from Antibody Registry query."} except requests.exceptions.RequestException as e: return {"error": f"Failed to fetch antibody information from Antibody Registry: {e!s}"}
- src/biocontext_kb/core/__init__.py:6-6 (registration)Star import from antibodyregistry module, which imports and registers the get_antibody_information tool via its @core_mcp.tool() decorator.from .biorxiv import *
- src/biocontext_kb/core/antibodyregistry/__init__.py:1-2 (registration)Imports the handler function into the package namespace to enable registration when imported from core/__init__.pyfrom ._get_antibody_information import get_antibody_information from ._get_antibody_list import get_antibody_list
- Defines the core_mcp FastMCP instance with name 'BC', which prefixes all registered tools with 'bc_' (e.g., bc_get_antibody_information).from fastmcp import FastMCP core_mcp = FastMCP( # type: ignore "BC", instructions="Provides access to biomedical knowledge bases.", )