Skip to main content
Glama

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. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observed

TDQS

A4.1/5.0
Behavior3/5

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

readOnlyHint=true already tells the agent this is a safe read, so the safety burden is carried. The description adds useful scope context ('full parameter set', advanced queries) but says nothing about openFDA rate limits or API-key requirements, and the pagination caps are left to the schema.

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?

Three front-loaded sentences that lead with the tool's role and then give routing guidance. The long parenthetical list of endpoints duplicates the enum in the schema, which is mild redundancy, but it aids scanability and doesn't bury the key message.

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?

Covers the essential facts for a generic multi-endpoint query tool: what it covers, when to prefer it, and that it's a raw REST wrapper. With no output schema, it could say more about the shared response envelope, but endpoint-specific output is inherently variable and the usage picture is 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 description coverage is 100%, so every parameter is already documented with format detail (Lucene syntax, skip/limit ranges, sort syntax). The description adds only the phrase 'full parameter set' without any format or constraint detail, so the baseline 3 is appropriate.

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?

States a specific verb+resource ('query ANY supported openFDA endpoint') and immediately frames its role as a 'generic escape hatch' versus the named search tools. An agent can tell exactly what it does and where it sits relative to siblings without opening the schema.

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?

Explicit routing rules: use this for less-common datasets or advanced queries, use the named search tools for common datasets. It even enumerates which datasets fall on the 'less-common' side (device/pma, drug/orangebook, tobacco/problem, etc.), so when-to-use and when-not-to-use are both stated.

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.