Skip to main content
Glama
biocontext-ai

BioContextAI Knowledgebase MCP

Official

bc_get_drug_by_application_number

Retrieve detailed FDA-approved drug information by entering its application number (NDA, ANDA, or BLA format). Access comprehensive data from the FDA Drugs@FDA API for brand, generic, or biological products.

Instructions

Get detailed information about a specific FDA-approved drug by its application number.

Application numbers follow the format: NDA, ANDA, or BLA followed by 6 digits.

  • NDA: New Drug Application (brand name drugs)

  • ANDA: Abbreviated New Drug Application (generic drugs)

  • BLA: Biologics License Application (biological products)

Args: application_number (str): The FDA application number.

Returns: dict: Detailed drug information from the FDA Drugs@FDA API.

Input Schema

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

Implementation Reference

  • The handler function decorated with @core_mcp.tool(). It takes an application_number parameter (with schema via Annotated and Field) and queries the FDA API at https://api.fda.gov/drug/drugsfda.json for drug information.
    @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}"}
  • Re-exports the tool function for use in higher-level imports.
    from ._count_drugs import count_drugs_by_field, get_drug_statistics from ._get_drug_info import get_drug_by_application_number, get_drug_label_info from ._search_drugs import search_drugs_fda __all__ = [ "count_drugs_by_field", "get_available_pharmacologic_classes", "get_drug_by_application_number",
  • Star import of openfda module, which triggers registration of tools via their decorators when core_mcp is used.
    from .openfda import *
  • Defines the core_mcp FastMCP server instance named 'BC' where tools are registered via @core_mcp.tool() decorators.
    core_mcp = FastMCP( # type: ignore "BC", instructions="Provides access to biomedical knowledge bases.", )

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