Skip to main content
Glama
lzinga

US Government Open Data MCP

fda_count

Count and aggregate FDA data by specific fields across drug, device, food, veterinary, and tobacco endpoints to identify patterns and trends in regulatory information.

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
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')
searchNoOptional search filter to narrow results before counting
limitNoMax count results (default: API default)
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses key behavioral traits: the tool returns 'top terms with counts', explains the '.exact' suffix effect on multi-word values, mentions an optional search filter to narrow results, and notes a default limit. It lacks details on rate limits, authentication needs, or error handling, but covers core operational behavior adequately.

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 appropriately sized and front-loaded: the first sentence states the core purpose, followed by important usage notes and examples. Every sentence adds value, such as the '.exact' suffix explanation and endpoint examples. It could be slightly more structured but remains efficient without waste.

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?

Given the tool's complexity (4 parameters, no annotations, no output schema), the description is quite complete. It covers purpose, usage, key parameters, and behavioral aspects like result formatting and filtering. It lacks output schema details (e.g., exact return structure), but the description of 'top terms with counts' provides adequate context for a count/aggregation tool.

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 description coverage is 100%, so the baseline is 3. The description adds significant value beyond the schema: it explains the '.exact' suffix usage with examples, provides endpoint-specific count_field examples (e.g., 'drug/ndc → pharm_class.exact'), and clarifies the impact of the search parameter ('narrow results before counting'). This compensates well for the lack of output schema.

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 clearly states the tool's purpose: 'Count/aggregate any OpenFDA endpoint by a specific field. Returns top terms with counts.' It specifies the verb ('count/aggregate'), resource ('OpenFDA endpoint'), and distinguishes itself from siblings by focusing on FDA data aggregation, unlike the many non-FDA sibling tools listed (e.g., census, cdc, congress tools).

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 provides clear context for when to use this tool: 'Works on ALL FDA endpoints' and lists specific endpoints and example count_field values. However, it does not explicitly state when NOT to use it or name alternative tools for similar tasks (e.g., other FDA tools like fda_drug_counts), though the sibling list includes many FDA-specific tools that might serve different purposes.

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

Install Server

Other Tools

Latest Blog Posts

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/lzinga/us-government-open-data-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server