Skip to main content
Glama
lzinga

US Government Open Data MCP

by lzinga

fda_count

Read-onlyIdempotent

Aggregate FDA data by any field across OpenFDA endpoints, returning top terms and counts. Use .exact suffix to count full phrases instead of individual words.

Instructions

Count/aggregate any OpenFDA endpoint by a specific field. Returns top terms with counts. Works on ALL FDA endpoints. IMPORTANT: Use '.exact' suffix for full phrase counts (e.g. 'brand_name.exact'). Without '.exact', multi-word values like 'Class III' are split into separate word counts.

Endpoints: drug/event, drug/label, drug/ndc, drug/enforcement, drug/drugsfda, drug/shortages, device/event, device/510k, device/classification, device/enforcement, device/recall, device/pma, device/udi, food/enforcement, food/event, animalandveterinary/event, tobacco/problem.

Example count_field values per endpoint:

  • drug/ndc → pharm_class.exact, dea_schedule, dosage_form.exact

  • drug/shortages → update_type, status.exact, therapeutic_category.exact

  • device/510k → country_code, advisory_committee, clearance_type.exact

  • tobacco/problem → tobacco_products.exact, reported_health_problems.exact

  • food/event → reactions.exact, outcomes.exact

  • animalandveterinary/event → animal.species.exact, primary_reporter.exact

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax count results (default: API default)
searchNoOptional search filter to narrow results before counting
endpointYesOpenFDA endpoint path (e.g. 'drug/ndc', 'device/510k', 'tobacco/problem')
count_fieldYesField to count. Use '.exact' for full phrases (e.g. 'pharm_class.exact')

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2026.4.11
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv2026.3.9

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already signal read-only, idempotent, non-destructive behavior. The description adds genuinely useful behavioral detail beyond that: the `.exact` suffix requirement and the warning that multi-word values are split into separate word counts without it.

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

Conciseness4/5

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

The description is well-structured and front-loads the critical `.exact` caveat. The endpoint list largely duplicates the schema enum, but the example count_field values justify the length and make the tool easier to use.

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?

The description covers output shape, the key field-format nuance, supported endpoints, and concrete example fields. Since there is no output schema, it does enough to prepare an agent to call the tool correctly, though it leaves search-filter behavior entirely to the schema.

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?

Schema coverage is 100%, so the baseline is fair, and the description adds value by providing per-endpoint example values for count_field and explaining the `.exact` suffix. This helps an agent pick realistic field names without external lookup.

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 states a specific verb and resource: 'Count/aggregate any OpenFDA endpoint by a specific field' and clarifies output as 'top terms with counts.' It also distinguishes itself from per-endpoint FDA siblings by emphasizing it works on ALL FDA endpoints.

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

Usage Guidelines4/5

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

The description gives clear context for when to use the tool: any OpenFDA endpoint and any count_field, with supported endpoint examples. It does not explicitly name alternatives or exclusions, so it stops just short of the strongest possible routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools