Skip to main content
Glama

openfda

Query any openFDA endpoint (generic)

openfda_query
Read-only

Generic escape hatch to query ANY supported openFDA endpoint with the full parameter set — covers the less-common datasets (device/pma, device/registrationlisting, device/udi, device/covid19serology, drug/orangebook, other/nsde, other/substance, tobacco/problem, etc.). Use the named search tools for the common datasets; use this for everything else or for advanced queries. openFDA REST API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
skipNoNumber of records to skip, for pagination (0–25000; skip+limit reaches up to ~26000 records).
sortNoSort order, as `field:asc` or `field:desc`, e.g. 'receivedate:desc'.
countNoOptional field to aggregate on (returns `results: [{term, count}]`); add '.exact' for whole phrases.
limitNoMax number of records to return (1–1000). Omit for the API default of 1.
searchNoLucene-style query over this dataset's fields: 'field:term', AND with '+AND+', OR with a space, exact phrase via a '.exact' field suffix with quotes, ranges as '[low+TO+high]' (dates like '[20040101+TO+20081231]'). Example: e.g. brand_name:"x" (fields vary by endpoint)
endpointYesThe openFDA endpoint to query, e.g. 'drug/event', 'device/510k', 'food/enforcement'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so the safe-read profile is covered, and the description adds that it exposes the full parameter set and spans the whole API surface. However, for an openFDA tool it omits operationally relevant traits such as rate limits / API-key requirements and the practical paging ceiling behavior. Adds some value, but not rich behavioral context.

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?

Two front-loaded sentences that put the scope claim and the routing rule first, with no padding. The trailing fragment 'openFDA REST API.' is a minor dangling stub rather than earned content.

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?

For a 6-parameter generic tool with a fully documented schema and no annotations beyond readOnly, the description supplies the scope and routing an agent needs. Return-shape details are unnecessary without an output schema, though the omitted rate-limit caveat keeps it short of complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so every parameter (search, sort, count, limit, skip, endpoint) is already documented in the schema, and the description adds no syntax or format detail beyond it. Baseline 3 is appropriate when the schema carries the parameter burden.

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+resource ('query ANY supported openFDA endpoint') and explicitly frames itself as the generic escape hatch covering less-common datasets. It names concrete examples (device/pma, device/udi, drug/orangebook, tobacco/problem) and contrasts with the named search tools, so an agent can distinguish it from all siblings.

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

Usage Guidelines5/5

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

It gives explicit routing rules: use the named search tools for common datasets, use this one for everything else or for advanced queries. That is a clear when-to-use / when-not-to-use split with an alternative named.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.