Skip to main content
Glama

BioContextAI Knowledgebase MCP

Official

bc_count_drugs_by_field

Count unique values in FDA-approved drug fields like sponsor, dosage form, or route for statistical analysis and database insights using BioContextAI Knowledgebase MCP.

Instructions

Count unique values in a specific field across FDA-approved drugs.

This function is useful for statistical analysis and getting overviews of the drug database. Common fields to count include:

  • sponsor_name: Count drugs by pharmaceutical company
  • products.dosage_form: Count by dosage forms (tablet, injection, etc.)
  • products.route: Count by administration routes (oral, injection, etc.)
  • products.marketing_status: Count by marketing status
  • openfda.pharm_class_epc: Count by pharmacologic class

Args: field (str): The field to count unique values for. search_filter (str, optional): Search filter to apply before counting. limit (int): Maximum number of count results to return.

Returns: dict: Count results showing terms and their frequencies.

Input Schema

NameRequiredDescriptionDefault
fieldYesField to count by (e.g., 'sponsor_name', 'products.dosage_form', 'products.route', 'products.marketing_status', 'openfda.pharm_class_epc')
limitNoMaximum number of count results to return
search_filterNoOptional search filter to apply before counting

Input Schema (JSON Schema)

{ "properties": { "field": { "description": "Field to count by (e.g., 'sponsor_name', 'products.dosage_form', 'products.route', 'products.marketing_status', 'openfda.pharm_class_epc')", "title": "Field", "type": "string" }, "limit": { "default": 100, "description": "Maximum number of count results to return", "maximum": 1000, "minimum": 1, "title": "Limit", "type": "integer" }, "search_filter": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Optional search filter to apply before counting", "title": "Search Filter" } }, "required": [ "field" ], "type": "object" }
Install Server

Other Tools from BioContextAI Knowledgebase MCP

Related Tools

    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