Openfda Tools#

Configuration File: openfda_tools.json Tool Type: Local Tools Count: 12

This page contains all tools defined in the openfda_tools.json configuration file.

Available Tools#

OpenFDA_search_animalvet_adverse_events (Type: BaseRESTTool)#

Search the FDA animal & veterinary adverse-event database via openFDA. Contains reports of advers…

OpenFDA_search_animalvet_adverse_events tool specification

Tool Information:

  • Name: OpenFDA_search_animalvet_adverse_events

  • Type: BaseRESTTool

  • Description: Search the FDA animal & veterinary adverse-event database via openFDA. Contains reports of adverse drug experiences in animals (and humans exposed) involving veterinary drugs. Returns affected animal species/breed, reactions (VeDDRA terms), drug(s) involved, number of animals affected/treated, outcome/health assessment, and dates. Use for veterinary pharmacovigilance. Reports are voluntary and do not establish causation.

Parameters:

  • search (string) (required) Lucene query for animal/veterinary events (e.g., ‘animal.species:Dog’, ‘drug.active_ingredients.name:ivermectin’, ‘reaction.veddra_term_name:Vomiting’).

  • limit ([‘integer’, ‘null’]) (optional) Maximum number of results (default 5, max 100)

  • skip ([‘integer’, ‘null’]) (optional) Number of results to skip; continue with metadata.next_skip (max 25000)

Example Usage:

query = {
    "name": "OpenFDA_search_animalvet_adverse_events",
    "arguments": {
        "search": "example_value"
    }
}
result = tu.run(query)

OpenFDA_search_device_510k (Type: BaseRESTTool)#

Search the FDA 510(k) premarket notification database via openFDA with exact totals and skip pagi…

OpenFDA_search_device_510k tool specification

Tool Information:

  • Name: OpenFDA_search_device_510k

  • Type: BaseRESTTool

  • Description: Search the FDA 510(k) premarket notification database via openFDA with exact totals and skip pagination. Continue with metadata.next_skip while metadata.has_more is true; very broad searches disclose the upstream 25,100-record reachable window.

Parameters:

  • search (string) (required) Lucene query for 510(k) devices (e.g., ‘device_name:stethoscope’, ‘applicant:siemens’, ‘decision_date_year:2023’, ‘advisory_committee_description:radiology’)

  • limit ([‘integer’, ‘null’]) (optional) Maximum number of results (default 5, max 100)

  • skip (integer) (optional) Number of matching records to skip. Continue with metadata.next_skip.

Example Usage:

query = {
    "name": "OpenFDA_search_device_510k",
    "arguments": {
        "search": "example_value"
    }
}
result = tu.run(query)

OpenFDA_search_device_adverse_events (Type: BaseRESTTool)#

Search the FDA MAUDE medical-device adverse-event database via openFDA. Contains voluntary and ma…

OpenFDA_search_device_adverse_events tool specification

Tool Information:

  • Name: OpenFDA_search_device_adverse_events

  • Type: BaseRESTTool

  • Description: Search the FDA MAUDE medical-device adverse-event database via openFDA. Contains voluntary and mandatory reports of device-associated injuries, malfunctions, and deaths. Returns event type (Death/Injury/Malfunction), device brand/generic name, manufacturer, product problems, patient outcomes, and report dates. Use for device safety signal detection and post-market surveillance. MAUDE reports are unverified and do not establish causation.

Parameters:

  • search (string) (required) Lucene query for MAUDE device events (e.g., ‘device.generic_name:pacemaker’, ‘event_type:Death’, ‘device.brand_name:”INSULIN PUMP”’, ‘date_received:[20230101+TO+20231231]’).

  • limit ([‘integer’, ‘null’]) (optional) Maximum number of results (default 5, max 100)

  • skip ([‘integer’, ‘null’]) (optional) Number of results to skip; continue with metadata.next_skip (max 25000)

Example Usage:

query = {
    "name": "OpenFDA_search_device_adverse_events",
    "arguments": {
        "search": "example_value"
    }
}
result = tu.run(query)

OpenFDA_search_device_enforcement (Type: BaseRESTTool)#

Search FDA medical-device recalls via openFDA. Record mode exposes exact totals and skip paginati…

OpenFDA_search_device_enforcement tool specification

Tool Information:

  • Name: OpenFDA_search_device_enforcement

  • Type: BaseRESTTool

  • Description: Search FDA medical-device recalls via openFDA. Record mode exposes exact totals and skip pagination; continue with metadata.next_skip. Count mode does not support skip and reports whether its term list reached the requested limit.

Parameters:

  • search ([‘string’, ‘null’]) (optional) Lucene query for device recalls (e.g., ‘classification:”Class I”’, ‘status:Ongoing’, ‘product_description:pacemaker’, ‘recalling_firm:medtronic’). Leave null to get recent recalls.

  • limit ([‘integer’, ‘null’]) (optional) Record mode: max 100. Count mode: max 1000 terms.

  • skip (integer) (optional) Record mode only. Number of recalls to skip; continue with metadata.next_skip. Must be 0 when count is used.

  • count ([‘string’, ‘null’]) (optional) Field to count by. Must use the ‘.exact’ keyword sub-field for text columns or openFDA rejects the request (e.g. ‘classification.exact’, ‘status.exact’, ‘recalling_firm.exact’).

Example Usage:

query = {
    "name": "OpenFDA_search_device_enforcement",
    "arguments": {
    }
}
result = tu.run(query)

OpenFDA_search_device_recalls (Type: BaseRESTTool)#

Search the FDA medical-device recall database via openFDA. Returns device recalls with product de…

OpenFDA_search_device_recalls tool specification

Tool Information:

  • Name: OpenFDA_search_device_recalls

  • Type: BaseRESTTool

  • Description: Search the FDA medical-device recall database via openFDA. Returns device recalls with product description, recalling firm, recall status, FDA-determined cause, classification, associated 510(k)/PMA numbers, product code, and key dates (initiated/posted/terminated). Use for device safety research and tracking corrective actions. Distinct from device enforcement reports.

Parameters:

  • search (string) (required) Lucene query for device recalls (e.g., ‘product_description:catheter’, ‘recalling_firm:Medtronic’, ‘recall_status:Open’, ‘product_code:DXN’).

  • limit ([‘integer’, ‘null’]) (optional) Maximum number of results (default 5, max 100)

  • skip ([‘integer’, ‘null’]) (optional) Number of results to skip; continue with metadata.next_skip (max 25000)

Example Usage:

query = {
    "name": "OpenFDA_search_device_recalls",
    "arguments": {
        "search": "example_value"
    }
}
result = tu.run(query)

OpenFDA_search_drug_enforcement (Type: BaseRESTTool)#

Search FDA drug recalls via openFDA. Record mode exposes exact totals and skip pagination; contin…

OpenFDA_search_drug_enforcement tool specification

Tool Information:

  • Name: OpenFDA_search_drug_enforcement

  • Type: BaseRESTTool

  • Description: Search FDA drug recalls via openFDA. Record mode exposes exact totals and skip pagination; continue with metadata.next_skip. Count mode does not support skip and reports whether its term list reached the requested limit.

Parameters:

  • search ([‘string’, ‘null’]) (optional) Lucene query for drug recalls (e.g., ‘classification:”Class I”’, ‘status:Ongoing’, ‘recalling_firm:pfizer’, ‘reason_for_recall:contamination’). Leave null to get recent recalls.

  • limit ([‘integer’, ‘null’]) (optional) Record mode: max 100. Count mode: max 1000 terms.

  • skip (integer) (optional) Record mode only. Number of recalls to skip; continue with metadata.next_skip. Must be 0 when count is used.

  • count ([‘string’, ‘null’]) (optional) Field to count by for frequency analysis. Must use the ‘.exact’ keyword sub-field for text columns or openFDA rejects the request (e.g. ‘classification.exact’, ‘recalling_firm.exact’, ‘voluntary_mandated.exact’).

Example Usage:

query = {
    "name": "OpenFDA_search_drug_enforcement",
    "arguments": {
    }
}
result = tu.run(query)

OpenFDA_search_drug_events (Type: OpenFDADrugEventsTool)#

Search the FDA Adverse Event Reporting System (FAERS) database via openFDA for drug safety report…

OpenFDA_search_drug_events tool specification

Tool Information:

  • Name: OpenFDA_search_drug_events

  • Type: OpenFDADrugEventsTool

  • Description: Search the FDA Adverse Event Reporting System (FAERS) database via openFDA for drug safety reports. Accepts convenience parameters drug_name and reaction (e.g., drug_name=’warfarin’, reaction=’haemorrhage’), a raw Lucene ‘search’ string for advanced queries, or any combination of them – whichever you supply are AND-ed together, so passing ‘search’ alongside drug_name narrows that drug rather than replacing it. Contains 20+ million adverse event reports. IMPORTANT: MedDRA reaction terms use British English spelling (e.g., ‘haemorrhage’ not ‘hemorrhage’, ‘haematoma’ not ‘hematoma’). Returns serious adverse events with outcomes (hospitalization, death), suspect drugs, and MedDRA reactions. Record mode exposes exact totals and skip pagination; continue with metadata.next_skip. Count mode does not support skip and reports whether its term list reached the requested limit.

Parameters:

  • search (string) (optional) Lucene query for adverse event reports. Use AND/OR with spaces (not +AND+). A FAERS report names its drug in up to three fields and none is a superset of the others, so a drug clause must OR all three inside parentheses or it undercounts (measured 2026-08-11: tofacitinib has 13,075 reports under patient.drug.medicinalproduct alone against 186,783 across all three). Prefer the ‘drug_name’ parameter, which builds that clause for you. Examples: ‘(patient.drug.medicinalproduct:aspirin OR patient.drug.openfda.generic_name:aspirin OR patient.drug.openfda.brand_name:aspirin)’, ‘patient.reaction.reactionmeddrapt:”myocardial infarction”’, ‘serious:1 AND (patient.drug.medicinalproduct:warfarin OR patient.drug.openfda.generic_name:warfarin OR patient.drug.openfda.brand_name:warfarin)’. Combine drugs by AND-ing one parenthesized group per drug.

  • limit ([‘integer’, ‘null’]) (optional) Record mode: max 100. Count mode: max 1000 terms.

  • count ([‘string’, ‘null’]) (optional) Field to count by for frequency analysis (e.g., ‘patient.reaction.reactionmeddrapt.exact’ to get most common reactions)

  • drug_name ([‘string’, ‘null’]) (optional) Drug name to search for adverse events (e.g., ‘warfarin’, ‘metformin’). Brand or generic: the name is matched against patient.drug.medicinalproduct, patient.drug.openfda.generic_name and patient.drug.openfda.brand_name, the same three fields every FAERS_* tool searches. Alternative to writing a full Lucene ‘search’ query, and preferred over it.

  • reaction ([‘string’, ‘null’]) (optional) MedDRA adverse reaction term (British spelling: ‘haemorrhage’ not ‘hemorrhage’, ‘haematoma’ not ‘hematoma’). Used with drug_name to filter by reaction.

  • adverse_event ([‘string’, ‘null’]) (optional) Alias for reaction. MedDRA adverse reaction term (British spelling).

  • skip (integer) (optional) Record mode only. Number of reports to skip; continue with metadata.next_skip. Must be 0 when count is used.

Example Usage:

query = {
    "name": "OpenFDA_search_drug_events",
    "arguments": {
    }
}
result = tu.run(query)

OpenFDA_search_drug_labels (Type: BaseRESTTool)#

Search the FDA drug label (SPL - Structured Product Labeling) database via openFDA. Contains appr…

OpenFDA_search_drug_labels tool specification

Tool Information:

  • Name: OpenFDA_search_drug_labels

  • Type: BaseRESTTool

  • Description: Search the FDA drug label (SPL - Structured Product Labeling) database via openFDA. Contains approved prescription and OTC drug labels including indications, warnings, dosage, adverse reactions, contraindications, and pharmacology sections. Use Lucene query syntax: ‘openfda.brand_name:aspirin’, ‘openfda.generic_name:ibuprofen’, ‘openfda.manufacturer_name:pfizer’. Returns label text sections and openFDA cross-references (brand name, generic name, substance name, product type). Some labels are not linked to openFDA fields (for example TAGRISSO / osimertinib), so an ‘openfda.*’ query can find nothing even though the label exists: search the name as free text (‘TAGRISSO’), or use FDA_search_drug_labels with drug_name, which also checks unlinked labels. Exact totals and skip pagination: continue with metadata.next_skip while metadata.has_more is true; metadata discloses openFDA’s 25,100-record reachable window for very broad searches.

Parameters:

  • search (string) (required) Lucene query to search drug labels (e.g., ‘openfda.brand_name:aspirin’, ‘openfda.generic_name:metformin’, ‘indications_and_usage:diabetes’, ‘openfda.pharm_class_epc:”beta blocker”’)

  • limit ([‘integer’, ‘null’]) (optional) Maximum number of results (default 1, max 100)

  • skip (integer) (optional) Number of matching records to skip. Continue with metadata.next_skip.

Example Usage:

query = {
    "name": "OpenFDA_search_drug_labels",
    "arguments": {
        "search": "example_value"
    }
}
result = tu.run(query)

OpenFDA_search_drug_ndc (Type: BaseRESTTool)#

Search the FDA National Drug Code Directory via openFDA with exact totals and skip pagination. Co…

OpenFDA_search_drug_ndc tool specification

Tool Information:

  • Name: OpenFDA_search_drug_ndc

  • Type: BaseRESTTool

  • Description: Search the FDA National Drug Code Directory via openFDA with exact totals and skip pagination. Continue with metadata.next_skip while metadata.has_more is true; very broad searches disclose the upstream 25,100-record reachable window.

Parameters:

  • search (string) (required) Lucene query for NDC products (e.g., ‘brand_name:lipitor’, ‘generic_name:atorvastatin’, ‘active_ingredients.name:metformin’, ‘finished:true AND marketing_status:”Prescription”’)

  • limit ([‘integer’, ‘null’]) (optional) Maximum number of results (default 5, max 100)

  • skip (integer) (optional) Number of matching records to skip. Continue with metadata.next_skip.

Example Usage:

query = {
    "name": "OpenFDA_search_drug_ndc",
    "arguments": {
        "search": "example_value"
    }
}
result = tu.run(query)

OpenFDA_search_drug_shortages (Type: BaseRESTTool)#

Search the FDA drug shortages database via openFDA (added 2025). Returns current and resolved U.S…

OpenFDA_search_drug_shortages tool specification

Tool Information:

  • Name: OpenFDA_search_drug_shortages

  • Type: BaseRESTTool

  • Description: Search the FDA drug shortages database via openFDA (added 2025). Returns current and resolved U.S. drug shortages with generic name, dosage form, presentation, shortage status (Current/Resolved), reported reason for the shortage, therapeutic category, manufacturer, and availability/related info. Use for supply-chain monitoring, formulary planning, and identifying alternatives for drugs in shortage. NOT a substitute for the official FDA shortage list for clinical decisions.

Parameters:

  • search (string) (required) Lucene query for drug shortages (e.g., ‘status:Current’, ‘generic_name:amoxicillin’, ‘dosage_form:Injection’, ‘therapeutic_category:Antibiotic’). Combine with AND/OR.

  • limit ([‘integer’, ‘null’]) (optional) Maximum number of results (default 5, max 100)

  • skip ([‘integer’, ‘null’]) (optional) Number of results to skip; continue with metadata.next_skip (max 25000)

Example Usage:

query = {
    "name": "OpenFDA_search_drug_shortages",
    "arguments": {
        "search": "example_value"
    }
}
result = tu.run(query)

OpenFDA_search_food_adverse_events (Type: BaseRESTTool)#

Search the FDA CAERS database (Center for Food Safety and Applied Nutrition Adverse Event Reporti…

OpenFDA_search_food_adverse_events tool specification

Tool Information:

  • Name: OpenFDA_search_food_adverse_events

  • Type: BaseRESTTool

  • Description: Search the FDA CAERS database (Center for Food Safety and Applied Nutrition Adverse Event Reporting System) via openFDA. Covers adverse events and product complaints for foods, dietary supplements, and cosmetics. Returns reported reactions (MedDRA terms), patient outcomes, product role/industry, and dates. Use for supplement/cosmetic/food safety surveillance. Reports are voluntary, unverified, and do not establish causation.

Parameters:

  • search (string) (required) Lucene query for CAERS food/supplement/cosmetic events (e.g., ‘reactions:NAUSEA’, ‘products.industry_name:Cosmetics’, ‘outcomes:”Hospitalization”’, ‘products.role:Suspect’).

  • limit ([‘integer’, ‘null’]) (optional) Maximum number of results (default 5, max 100)

  • skip ([‘integer’, ‘null’]) (optional) Number of results to skip; continue with metadata.next_skip (max 25000)

Example Usage:

query = {
    "name": "OpenFDA_search_food_adverse_events",
    "arguments": {
        "search": "example_value"
    }
}
result = tu.run(query)

OpenFDA_search_food_enforcement (Type: BaseRESTTool)#

Search FDA food recalls via openFDA. Record mode exposes exact totals and skip pagination; contin…

OpenFDA_search_food_enforcement tool specification

Tool Information:

  • Name: OpenFDA_search_food_enforcement

  • Type: BaseRESTTool

  • Description: Search FDA food recalls via openFDA. Record mode exposes exact totals and skip pagination; continue with metadata.next_skip. Count mode does not support skip and reports whether its term list reached the requested limit.

Parameters:

  • search ([‘string’, ‘null’]) (optional) Lucene query for food recalls (e.g., ‘classification:”Class I”’, ‘reason_for_recall:salmonella’, ‘status:Ongoing’, ‘product_description:peanut’). Leave null to get recent recalls.

  • limit ([‘integer’, ‘null’]) (optional) Record mode: max 100. Count mode: max 1000 terms.

  • skip (integer) (optional) Record mode only. Number of recalls to skip; continue with metadata.next_skip. Must be 0 when count is used.

  • count ([‘string’, ‘null’]) (optional) Field to count by. Must use the ‘.exact’ keyword sub-field for text columns or openFDA rejects the request (e.g. ‘classification.exact’, ‘state.exact’, ‘recalling_firm.exact’).

Example Usage:

query = {
    "name": "OpenFDA_search_food_enforcement",
    "arguments": {
    }
}
result = tu.run(query)