openfda_count_values
ActiveTool of @cyanheads/openfda-mcp-server
Aggregate and tally unique values for any field across any openFDA endpoint. Returns ranked term-count pairs sorted by count descending. Pair with openfda_search_adverse_events, openfda_search_drug_approvals, openfda_search_device_clearances, openfda_search_recalls, openfda_get_drug_label, or openfda_lookup_ndc when sample records help interpret the aggregates.
Parameters schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"endpoint",
"count"
],
"properties": {
"count": {
"type": "string",
"description": "Field to count. Append .exact for whole-phrase counting (e.g. \"patient.reaction.reactionmeddrapt.exact\", \"openfda.brand_name.exact\")"
},
"limit": {
"type": "number",
"default": 100,
"maximum": 1000,
"minimum": 1,
"description": "Number of top terms to return (default 100, max 1000)"
},
"search": {
"type": "string",
"description": "Filter query to scope the count (e.g. patient.drug.medicinalproduct:\"metformin\")"
},
"endpoint": {
"enum": [
"drug/event",
"drug/label",
"drug/enforcement",
"drug/ndc",
"drug/drugsfda",
"drug/shortages",
"food/event",
"food/enforcement",
"device/event",
"device/510k",
"device/pma",
"device/recall",
"device/enforcement",
"device/classification",
"device/registrationlisting",
"device/udi",
"device/covid19serology",
"animalandveterinary/event",
"tobacco/problem",
"other/substance"
],
"type": "string",
"description": "Full openFDA endpoint path (e.g. \"drug/event\", \"device/classification\")"
}
}
}Parent server
@cyanheads/openfda-mcp-server
https://github.com/cyanheads/openfda-mcp-server
2/7 registries