Skip to main content
Glama
biocontext-ai

BioContextAI Knowledgebase MCP

Official

bc_get_drug_by_application_number

Retrieve FDA-approved drug details using application numbers (NDA/ANDA/BLA format) to access verified information about products, sponsors, and application data.

Instructions

Get detailed information about an FDA-approved drug by application number. Format: NDA/ANDA/BLA followed by 6 digits.

Returns: dict: FDA drug results with application details, products, sponsor information or error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
application_numberYesFDA application number (e.g., 'NDA021436', 'ANDA123456', 'BLA761234')

Implementation Reference

  • The handler function for the tool, decorated with @core_mcp.tool(). Fetches drug details from FDA API using the application number. Tool name becomes 'bc_get_drug_by_application_number' due to 'bc' prefix when core_mcp is imported into the main server.
    @core_mcp.tool() def get_drug_by_application_number( application_number: Annotated[ str, Field(description="FDA application number (e.g., 'NDA021436', 'ANDA123456', 'BLA761234')") ], ) -> dict: """Get detailed information about an FDA-approved drug by application number. Format: NDA/ANDA/BLA followed by 6 digits. Returns: dict: FDA drug results with application details, products, sponsor information or error message. """ # Validate application number format if not application_number or len(application_number) < 9: return {"error": "Application number must be provided and follow the format NDA/ANDA/BLA followed by 6 digits"} # Build the search query query = f"application_number:{application_number}" base_url = "https://api.fda.gov/drug/drugsfda.json" params = {"search": query, "limit": 1} try: response = requests.get(base_url, params=params) # type: ignore response.raise_for_status() return response.json() except requests.exceptions.RequestException as e: return {"error": f"Failed to fetch FDA drug data: {e!s}"}
  • Pydantic schema definition for the input parameter 'application_number' using Annotated and Field.
    application_number: Annotated[ str, Field(description="FDA application number (e.g., 'NDA021436', 'ANDA123456', 'BLA761234')") ],
  • Registers the core_mcp server (containing the tool) into the main mcp_app with prefix 'bc' (slugify('BC')), resulting in tool name 'bc_get_drug_by_application_number'.
    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', into which tools are registered via @core_mcp.tool() decorators.
    core_mcp = FastMCP( # type: ignore "BC", instructions="Provides access to biomedical knowledge bases.", )

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