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')

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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.",
    )
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. It discloses the return format ('dict: FDA drug results with application details, products, sponsor information or error message') and the expected input format. However, it doesn't mention error conditions beyond 'error message', rate limits, authentication needs, or whether this is a read-only operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured in two sentences: the first states purpose and format, the second specifies return type and content. Every element serves a purpose with zero wasted words, making it easy to parse.

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 (single parameter lookup), 100% schema coverage, and existence of an output schema, the description is reasonably complete. It covers purpose, format, and return structure. However, for a tool with no annotations, it could better address behavioral aspects like error handling or operational constraints.

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

Parameters4/5

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

The schema has 100% description coverage, so the baseline is 3. The description adds value by specifying the format ('NDA/ANDA/BLA followed by 6 digits') and providing examples in the Returns section, which helps clarify the parameter's purpose beyond the schema's basic description.

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 specific action ('Get detailed information'), target resource ('FDA-approved drug'), and key identifier ('by application number'). It distinguishes from siblings like bc_get_drug_label_info and bc_search_drugs_fda by focusing on application-number lookup rather than label retrieval or search functionality.

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

Usage Guidelines3/5

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

The description implies usage when you have an FDA application number and need detailed drug information. However, it doesn't explicitly state when to use this versus alternatives like bc_get_drug_label_info or bc_search_drugs_fda, nor does it mention prerequisites or exclusions.

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