data
openFDA CLI for AI Agents
Use the openFDA CLI from KosmoKrator to call openFDA tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.openFDA CLI Setup
openFDA can be configured headlessly with `kosmokrator integrations:configure openfda`.
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash
# Configure and verify this integration.
kosmokrator integrations:configure openfda --enable --read allow --write ask --json
kosmokrator integrations:doctor openfda --json
kosmokrator integrations:status --json Credentials
Authentication type: No credentials none. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
No credentials are required.
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call openfda.openfda_drug_event '{}' --json kosmo integrations:openfda openfda_drug_event '{}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs openfda --json
kosmo integrations:docs openfda.openfda_drug_event --json
kosmo integrations:schema openfda.openfda_drug_event --json
kosmo integrations:search "openFDA" --json
kosmo integrations:list --json Automation Contexts
The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.
CLI Functions
Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.
openfda.openfda_drug_event
Query FAERS drug adverse event reports.
read - Parameters
- none
kosmo integrations:call openfda.openfda_drug_event '{}' --json kosmo integrations:openfda openfda_drug_event '{}' --json openfda.openfda_drug_label
Query structured product labeling records.
read - Parameters
- none
kosmo integrations:call openfda.openfda_drug_label '{}' --json kosmo integrations:openfda openfda_drug_label '{}' --json openfda.openfda_drug_enforcement
Query drug recall enforcement reports.
read - Parameters
- none
kosmo integrations:call openfda.openfda_drug_enforcement '{}' --json kosmo integrations:openfda openfda_drug_enforcement '{}' --json openfda.openfda_drug_ndc
Query NDC directory product listings.
read - Parameters
- none
kosmo integrations:call openfda.openfda_drug_ndc '{}' --json kosmo integrations:openfda openfda_drug_ndc '{}' --json openfda.openfda_drug_drugsfda
Query Drugs@FDA application data.
read - Parameters
- none
kosmo integrations:call openfda.openfda_drug_drugsfda '{}' --json kosmo integrations:openfda openfda_drug_drugsfda '{}' --json openfda.openfda_drug_shortages
Query FDA drug shortage data.
read - Parameters
- none
kosmo integrations:call openfda.openfda_drug_shortages '{}' --json kosmo integrations:openfda openfda_drug_shortages '{}' --json openfda.openfda_device_510k
Query medical device 510(k) clearances.
read - Parameters
- none
kosmo integrations:call openfda.openfda_device_510k '{}' --json kosmo integrations:openfda openfda_device_510k '{}' --json openfda.openfda_device_classification
Query device classification records.
read - Parameters
- none
kosmo integrations:call openfda.openfda_device_classification '{}' --json kosmo integrations:openfda openfda_device_classification '{}' --json openfda.openfda_device_enforcement
Query device recall enforcement reports.
read - Parameters
- none
kosmo integrations:call openfda.openfda_device_enforcement '{}' --json kosmo integrations:openfda openfda_device_enforcement '{}' --json openfda.openfda_device_event
Query MAUDE medical device adverse events.
read - Parameters
- none
kosmo integrations:call openfda.openfda_device_event '{}' --json kosmo integrations:openfda openfda_device_event '{}' --json openfda.openfda_device_pma
Query premarket approval records.
read - Parameters
- none
kosmo integrations:call openfda.openfda_device_pma '{}' --json kosmo integrations:openfda openfda_device_pma '{}' --json openfda.openfda_device_recall
Query device recall records.
read - Parameters
- none
kosmo integrations:call openfda.openfda_device_recall '{}' --json kosmo integrations:openfda openfda_device_recall '{}' --json openfda.openfda_device_registrationlisting
Query device establishment registration and listing records.
read - Parameters
- none
kosmo integrations:call openfda.openfda_device_registrationlisting '{}' --json kosmo integrations:openfda openfda_device_registrationlisting '{}' --json openfda.openfda_device_udi
Query GUDID device identification records.
read - Parameters
- none
kosmo integrations:call openfda.openfda_device_udi '{}' --json kosmo integrations:openfda openfda_device_udi '{}' --json openfda.openfda_device_covid19_serology
Query COVID-19 serology test evaluations.
read - Parameters
- none
kosmo integrations:call openfda.openfda_device_covid19_serology '{}' --json kosmo integrations:openfda openfda_device_covid19_serology '{}' --json openfda.openfda_food_enforcement
Query food recall enforcement reports.
read - Parameters
- none
kosmo integrations:call openfda.openfda_food_enforcement '{}' --json kosmo integrations:openfda openfda_food_enforcement '{}' --json openfda.openfda_food_event
Query CAERS food, dietary supplement, and cosmetic adverse event reports.
read - Parameters
- none
kosmo integrations:call openfda.openfda_food_event '{}' --json kosmo integrations:openfda openfda_food_event '{}' --json openfda.openfda_animal_veterinary_event
Query animal and veterinary adverse event reports.
read - Parameters
- none
kosmo integrations:call openfda.openfda_animal_veterinary_event '{}' --json kosmo integrations:openfda openfda_animal_veterinary_event '{}' --json openfda.openfda_cosmetic_event
Query cosmetic adverse event reports.
read - Parameters
- none
kosmo integrations:call openfda.openfda_cosmetic_event '{}' --json kosmo integrations:openfda openfda_cosmetic_event '{}' --json openfda.openfda_tobacco_problem
Query tobacco product problem reports.
read - Parameters
- none
kosmo integrations:call openfda.openfda_tobacco_problem '{}' --json kosmo integrations:openfda openfda_tobacco_problem '{}' --json openfda.openfda_other_nsde
Query National Substance Data Exchange records.
read - Parameters
- none
kosmo integrations:call openfda.openfda_other_nsde '{}' --json kosmo integrations:openfda openfda_other_nsde '{}' --json openfda.openfda_other_substance
Query FDA substance records.
read - Parameters
- none
kosmo integrations:call openfda.openfda_other_substance '{}' --json kosmo integrations:openfda openfda_other_substance '{}' --json openfda.openfda_other_unii
Query Unique Ingredient Identifier records.
read - Parameters
- none
kosmo integrations:call openfda.openfda_other_unii '{}' --json kosmo integrations:openfda openfda_other_unii '{}' --json openfda.openfda_other_historicaldocument
Query openFDA historical documents.
read - Parameters
- none
kosmo integrations:call openfda.openfda_other_historicaldocument '{}' --json kosmo integrations:openfda openfda_other_historicaldocument '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
openfda.openfda_drug_event 0 parameters
kosmo integrations:schema openfda.openfda_drug_event --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
openfda.openfda_drug_label 0 parameters
kosmo integrations:schema openfda.openfda_drug_label --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
openfda.openfda_drug_enforcement 0 parameters
kosmo integrations:schema openfda.openfda_drug_enforcement --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
openfda.openfda_drug_ndc 0 parameters
kosmo integrations:schema openfda.openfda_drug_ndc --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
openfda.openfda_drug_drugsfda 0 parameters
kosmo integrations:schema openfda.openfda_drug_drugsfda --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
openfda.openfda_drug_shortages 0 parameters
kosmo integrations:schema openfda.openfda_drug_shortages --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
openfda.openfda_device_510k 0 parameters
kosmo integrations:schema openfda.openfda_device_510k --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
openfda.openfda_device_classification 0 parameters
kosmo integrations:schema openfda.openfda_device_classification --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
openfda.openfda_device_enforcement 0 parameters
kosmo integrations:schema openfda.openfda_device_enforcement --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
openfda.openfda_device_event 0 parameters
kosmo integrations:schema openfda.openfda_device_event --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
openfda.openfda_device_pma 0 parameters
kosmo integrations:schema openfda.openfda_device_pma --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
openfda.openfda_device_recall 0 parameters
kosmo integrations:schema openfda.openfda_device_recall --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
openfda.openfda_device_registrationlisting 0 parameters
kosmo integrations:schema openfda.openfda_device_registrationlisting --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
openfda.openfda_device_udi 0 parameters
kosmo integrations:schema openfda.openfda_device_udi --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
openfda.openfda_device_covid19_serology 0 parameters
kosmo integrations:schema openfda.openfda_device_covid19_serology --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
openfda.openfda_food_enforcement 0 parameters
kosmo integrations:schema openfda.openfda_food_enforcement --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
openfda.openfda_food_event 0 parameters
kosmo integrations:schema openfda.openfda_food_event --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
openfda.openfda_animal_veterinary_event 0 parameters
kosmo integrations:schema openfda.openfda_animal_veterinary_event --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
openfda.openfda_cosmetic_event 0 parameters
kosmo integrations:schema openfda.openfda_cosmetic_event --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
openfda.openfda_tobacco_problem 0 parameters
kosmo integrations:schema openfda.openfda_tobacco_problem --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
openfda.openfda_other_nsde 0 parameters
kosmo integrations:schema openfda.openfda_other_nsde --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
openfda.openfda_other_substance 0 parameters
kosmo integrations:schema openfda.openfda_other_substance --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
openfda.openfda_other_unii 0 parameters
kosmo integrations:schema openfda.openfda_other_unii --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
openfda.openfda_other_historicaldocument 0 parameters
kosmo integrations:schema openfda.openfda_other_historicaldocument --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
Permissions
Headless calls still follow the integration read/write permission policy. Configure read/write defaults with
integrations:configure. Add --force only for trusted automation that should bypass that policy.