Server definition
- Hash
- sha256:03b4742d1350b02f9281306506e1611af925369ce6d8c6c7d164493e3ebadfc2
- What it is
- What a remote MCP server returned when asked what it offers: 14 tools
The blob, as servednamed by its sha256
{
"instructions": "Use the openfda_* tools to query the openFDA public API for drugs, food, devices, and animal/veterinary products: search adverse events, drug approvals, device clearances, and recalls; look up NDC codes; fetch drug labels; aggregate field counts. Queries use dotted field paths joined by AND/OR with double-quoted phrases (e.g. `openfda.brand_name:\"aspirin\"`); cross-product fields use the `openfda.*` prefix.",
"tools": [
{
"description": "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.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"count": {
"description": "Field to count. openfda_describe_fields gives the verified expression per field as countAs (null = not countable in any form). Otherwise: append .exact for whole-phrase counting of free-text fields (e.g. \"patient.reaction.reactionmeddrapt.exact\"); count identifier fields openFDA already indexes as keywords (product_ndc, application_number, pma_number) bare — .exact on those is rejected as not countable.",
"minLength": 1,
"pattern": "\\S",
"type": "string"
},
"endpoint": {
"description": "Full openFDA endpoint path (e.g. \"drug/event\", \"device/classification\")",
"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"
},
"limit": {
"default": 100,
"description": "Number of top terms to return (default 100, max 1000 — openFDA's own count maximum). truncated reports whether more distinct terms exist beyond it, except at the maximum itself, where openFDA offers no way to tell.",
"maximum": 1000,
"minimum": 1,
"type": "number"
},
"search": {
"description": "Filter query to scope the count (e.g. patient.drug.medicinalproduct:\"metformin\"). Omit to count across every record in the endpoint. Double quotes, parentheses, and range brackets must balance, and the query must not end on a backslash — each is rejected before the request.",
"minLength": 1,
"pattern": "\\S",
"type": "string"
}
},
"required": [
"endpoint",
"count"
],
"type": "object"
},
"name": "openfda_count_values",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"meta",
"results",
"termCount"
]
},
{
"required": [
"error"
]
}
],
"properties": {
"cap": {
"description": "The limit applied to the term list.",
"type": "number"
},
"error": {
"additionalProperties": {},
"description": "Present when the call failed. Absent on success.",
"properties": {
"code": {
"description": "JSON-RPC error code for this failure.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"data": {
"additionalProperties": {},
"properties": {
"reason": {
"description": "Machine-readable failure mode. Declared by this tool: `rate_limited`: The openFDA daily or per-minute request limit is exceeded. `upstream_error`: The openFDA API returned a 5xx server error. `malformed_search`: The search query leaves a double quote, parenthesis, or range bracket unclosed, or ends on a backslash. `query_error`: The search or count query was rejected by openFDA (malformed field name, invalid syntax). `not_aggregatable`: openFDA cannot aggregate the count expression as written — an analyzed text field, .exact on a field already indexed as a keyword, or a field with no countable form. Other values are possible when a failure originates below the handler.",
"examples": [
"rate_limited",
"upstream_error",
"malformed_search",
"query_error",
"not_aggregatable"
],
"type": "string"
},
"recovery": {
"additionalProperties": {},
"description": "Actionable next step for the caller.",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"type": "object"
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"type": "object"
},
"message": {
"description": "Human-readable description of what went wrong.",
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"meta": {
"additionalProperties": false,
"description": "Response metadata",
"properties": {
"lastUpdated": {
"description": "Dataset last updated date",
"type": "string"
}
},
"required": [
"lastUpdated"
],
"type": "object"
},
"notice": {
"description": "Why the tally is empty — the search matched no records, or the matched records carry no value for the field — and how to widen it; when truncated, how to reach the omitted terms; at the 1000-term maximum, that openFDA cannot show whether more distinct values exist. Absent when a complete list is returned.",
"type": "string"
},
"results": {
"description": "Term-count pairs sorted by count descending",
"items": {
"additionalProperties": false,
"description": "A single term-count pair",
"properties": {
"count": {
"description": "Number of occurrences",
"type": "number"
},
"term": {
"description": "Field value",
"type": "string"
}
},
"required": [
"term",
"count"
],
"type": "object"
},
"type": "array"
},
"shown": {
"description": "Number of terms returned in this response.",
"type": "number"
},
"termCount": {
"description": "Number of distinct terms returned",
"type": "number"
},
"truncated": {
"description": "True when at least one more distinct term exists beyond the limit. Absent when the list is complete, and at the 1000-term maximum, where openFDA cannot show whether more exist (notice says so).",
"type": "boolean"
},
"truncationCeiling": {
"description": "Count of the lowest-ranked term returned — omitted terms fall at or below it.",
"type": "number"
}
},
"type": "object"
}
},
{
"description": "List the tables and column schemas on a DataCanvas staged by an openFDA search tool. Call before openfda_dataframe_query to discover the exact table name, column names, and DuckDB types needed for valid SQL. row_count is the full staged result set, not the inline preview count. Columns typed JSON hold nested openFDA objects/arrays — query them with DuckDB json functions.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"canvas_id": {
"description": "Canvas ID from the canvas_id field of an openFDA search tool response (openfda_search_* or openfda_lookup_ndc), present when the search ran with stage=true.",
"pattern": "^[A-Za-z0-9_-]{10}$",
"type": "string"
}
},
"required": [
"canvas_id"
],
"type": "object"
},
"name": "openfda_dataframe_describe",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"tables",
"canvas_id"
]
},
{
"required": [
"error"
]
}
],
"properties": {
"canvas_id": {
"description": "Canvas ID that was described — pass to openfda_dataframe_query.",
"type": "string"
},
"error": {
"additionalProperties": {},
"description": "Present when the call failed. Absent on success.",
"properties": {
"code": {
"description": "JSON-RPC error code for this failure.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"data": {
"additionalProperties": {},
"properties": {
"reason": {
"description": "Machine-readable failure mode. Declared by this tool: `canvas_disabled`: DataCanvas is disabled — CANVAS_PROVIDER_TYPE is unset. `canvas_not_found`: The canvas_id does not correspond to an active canvas session. Other values are possible when a failure originates below the handler.",
"examples": [
"canvas_disabled",
"canvas_not_found"
],
"type": "string"
},
"recovery": {
"additionalProperties": {},
"description": "Actionable next step for the caller.",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"type": "object"
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"type": "object"
},
"message": {
"description": "Human-readable description of what went wrong.",
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"tables": {
"description": "All tables and views available on this canvas.",
"items": {
"additionalProperties": false,
"description": "A registered table or view on the canvas.",
"properties": {
"columns": {
"description": "All columns in this table, in schema order.",
"items": {
"additionalProperties": false,
"description": "A single column in the table.",
"properties": {
"name": {
"description": "Column name — use in SELECT, WHERE, GROUP BY, ORDER BY.",
"type": "string"
},
"nullable": {
"description": "True when the column may contain NULL. Absent when unknown.",
"type": "boolean"
},
"type": {
"description": "DuckDB type (VARCHAR, JSON, BIGINT, DOUBLE, BOOLEAN, ...).",
"type": "string"
}
},
"required": [
"name",
"type"
],
"type": "object"
},
"type": "array"
},
"kind": {
"description": "Object type: \"table\" for staged data, \"view\" for a derived view.",
"type": "string"
},
"name": {
"description": "Table or view name — use verbatim in SQL FROM clauses.",
"type": "string"
},
"row_count": {
"description": "Total rows in this table — the full staged set, not the inline preview.",
"type": "number"
}
},
"required": [
"name",
"kind",
"row_count",
"columns"
],
"type": "object"
},
"type": "array"
}
},
"type": "object"
}
},
{
"description": "Run a read-only SQL SELECT against a DataCanvas table staged by an openFDA search tool (call one with stage=true; its response carries canvas_id + canvas_table). Enables GROUP BY, COUNT/SUM/AVG, time-series, and joins across the staged result set without re-paging the API. Call openfda_dataframe_describe first to get the exact table and column names. Results are capped at the canvas row limit — when truncated is true, page the rest with ORDER BY plus LIMIT/OFFSET. Scalar fields are stored as text (CAST for numeric math); nested objects/arrays are JSON columns — read them with DuckDB json functions, e.g. json_extract_string(openfda, '$.brand_name[0]'). Only SELECT is allowed — DDL, DML, COPY, and file-reading functions are blocked.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"canvas_id": {
"description": "Canvas ID from the canvas_id field of an openFDA search tool response (openfda_search_* or openfda_lookup_ndc), present when the search ran with stage=true.",
"pattern": "^[A-Za-z0-9_-]{10}$",
"type": "string"
},
"query": {
"description": "SQL SELECT against the staged table. Use the table name from openfda_dataframe_describe. Example: \"SELECT classification, COUNT(*) AS n FROM spilled_ab12cd34 GROUP BY classification ORDER BY n DESC\".",
"minLength": 1,
"pattern": "\\S",
"type": "string"
}
},
"required": [
"canvas_id",
"query"
],
"type": "object"
},
"name": "openfda_dataframe_query",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"rows",
"row_count",
"truncated",
"canvas_id"
]
},
{
"required": [
"error"
]
}
],
"properties": {
"canvas_id": {
"description": "Canvas ID that was queried — reuse for follow-up queries.",
"type": "string"
},
"error": {
"additionalProperties": {},
"description": "Present when the call failed. Absent on success.",
"properties": {
"code": {
"description": "JSON-RPC error code for this failure.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"data": {
"additionalProperties": {},
"properties": {
"reason": {
"description": "Machine-readable failure mode. Declared by this tool: `canvas_disabled`: DataCanvas is disabled — CANVAS_PROVIDER_TYPE is unset. `canvas_not_found`: The canvas_id does not correspond to an active canvas session. `missing_table`: The SQL references a table that is not on the canvas — dropped, expired, or mistyped. `invalid_query`: The SQL is not a valid SELECT, references an unknown column, uses a blocked operation, or fails on a staged value (a CAST that does not convert). Other values are possible when a failure originates below the handler.",
"examples": [
"canvas_disabled",
"canvas_not_found",
"missing_table",
"invalid_query"
],
"type": "string"
},
"recovery": {
"additionalProperties": {},
"description": "Actionable next step for the caller.",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"type": "object"
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"type": "object"
},
"message": {
"description": "Human-readable description of what went wrong.",
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"row_count": {
"description": "Number of rows in this response. Equals the canvas row limit when truncated is true.",
"type": "number"
},
"rows": {
"description": "Rows returned by the query (capped at the canvas row limit).",
"items": {
"additionalProperties": {},
"description": "A result row — keys are the SELECT column names, values the computed data.",
"propertyNames": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
"truncated": {
"description": "True when the result hit the canvas row limit and rows beyond it were dropped. Page the rest with ORDER BY plus LIMIT/OFFSET.",
"type": "boolean"
}
},
"type": "object"
}
},
{
"description": "Return the searchable field paths for an openFDA endpoint, grouped by category with type and description. Use before constructing a search query to find the correct dotted field path — field names differ per endpoint and are not discoverable from the tool schema alone.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"endpoint": {
"description": "openFDA endpoint to describe (e.g. \"drug/event\", \"drug/shortages\", \"device/510k\"). Must be one of the cataloged endpoints.",
"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"
}
},
"required": [
"endpoint"
],
"type": "object"
},
"name": "openfda_describe_fields",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"endpoint",
"groups",
"queryTips"
]
},
{
"required": [
"error"
]
}
],
"properties": {
"endpoint": {
"description": "The endpoint these fields apply to",
"type": "string"
},
"error": {
"additionalProperties": {},
"description": "Present when the call failed. Absent on success.",
"properties": {
"code": {
"description": "JSON-RPC error code for this failure.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"data": {
"additionalProperties": {},
"properties": {
"reason": {
"description": "Machine-readable failure mode.",
"type": "string"
},
"recovery": {
"additionalProperties": {},
"description": "Actionable next step for the caller.",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"type": "object"
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"type": "object"
},
"message": {
"description": "Human-readable description of what went wrong.",
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"groups": {
"description": "Field groups for this endpoint",
"items": {
"additionalProperties": false,
"description": "A named group of related fields",
"properties": {
"fields": {
"description": "Searchable fields in this group",
"items": {
"additionalProperties": false,
"description": "A single searchable field entry",
"properties": {
"countAs": {
"description": "Verified expression to pass as count in openfda_count_values (the bare path or path.exact); null when openFDA cannot aggregate the field in any form",
"type": [
"string",
"null"
]
},
"note": {
"description": "What this field contains",
"type": "string"
},
"path": {
"description": "Dotted field path for use in search queries",
"type": "string"
},
"type": {
"description": "Data type (string, date, integer, float, boolean)",
"type": "string"
}
},
"required": [
"path",
"type",
"countAs",
"note"
],
"type": "object"
},
"type": "array"
},
"label": {
"description": "Field group label",
"type": "string"
}
},
"required": [
"label",
"fields"
],
"type": "object"
},
"type": "array"
},
"queryTips": {
"description": "openFDA query syntax reminders relevant to this endpoint",
"type": "string"
}
},
"type": "object"
}
},
{
"description": "Resolve one drug name to its FDA identity, then fan out in parallel across the bounded per-drug openFDA endpoints and merge into one profile: identity, label highlights, adverse-event summary, recall history, Drugs@FDA approval, and shortage status. Replaces chaining openfda_get_drug_label, openfda_search_adverse_events, openfda_search_recalls, openfda_search_drug_approvals, and openfda_search_drug_shortages — and reconciles the identifier drift between endpoints that makes that chaining error-prone. Each section is best-effort: a miss returns null rather than failing the call. For deep dives into any one area, use the dedicated tool.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"drug": {
"description": "Drug name to profile — brand or generic (e.g. \"metformin\", \"Humira\", \"Glucophage\"). Resolved once to canonical FDA identifiers, which then key every sub-query.",
"minLength": 1,
"pattern": "\\S",
"type": "string"
}
},
"required": [
"drug"
],
"type": "object"
},
"name": "openfda_drug_profile",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"meta",
"identity",
"label",
"adverse_events",
"recalls",
"approval",
"shortage",
"degraded",
"sectionsFound"
]
},
{
"required": [
"error"
]
}
],
"properties": {
"adverse_events": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"seriousCount": {
"description": "Reports flagged serious (serious=1).",
"type": "number"
},
"topReactions": {
"description": "Most-frequent reported reactions, descending.",
"items": {
"additionalProperties": false,
"description": "A reaction term paired with its report count.",
"properties": {
"count": {
"description": "Reports citing this reaction.",
"type": "number"
},
"term": {
"description": "MedDRA reaction term.",
"type": "string"
}
},
"required": [
"term",
"count"
],
"type": "object"
},
"type": "array"
},
"total": {
"description": "Approximate total adverse-event reports naming this drug.",
"type": "number"
}
},
"required": [
"total",
"seriousCount",
"topReactions"
],
"type": "object"
},
{
"type": "null"
}
],
"description": "Adverse-event summary aggregated over drug/event, or null when unavailable."
},
"approval": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"applicationNumber": {
"description": "NDA/ANDA application number.",
"type": [
"string",
"null"
]
},
"marketingStatus": {
"description": "Derived marketing/approval status.",
"type": [
"string",
"null"
]
},
"sponsor": {
"description": "Sponsor/applicant name.",
"type": [
"string",
"null"
]
}
},
"required": [
"applicationNumber",
"sponsor",
"marketingStatus"
],
"type": "object"
},
{
"type": "null"
}
],
"description": "Drugs@FDA approval summary, or null when no application matched."
},
"degraded": {
"description": "Sub-queries that failed upstream, empty when every section resolved. A section listed here is unknown, not absent — a null section with no entry here genuinely has no FDA record.",
"items": {
"additionalProperties": false,
"description": "One failed sub-query and why it failed.",
"properties": {
"message": {
"description": "Upstream failure message for this section, truncated.",
"type": "string"
},
"reason": {
"description": "Machine-readable failure reason (e.g. rate_limited, upstream_error, query_error).",
"type": "string"
},
"section": {
"description": "Profile section whose sub-query failed.",
"enum": [
"identity",
"label",
"adverse_events",
"recalls",
"approval",
"shortage"
],
"type": "string"
}
},
"required": [
"section",
"reason",
"message"
],
"type": "object"
},
"type": "array"
},
"error": {
"additionalProperties": {},
"description": "Present when the call failed. Absent on success.",
"properties": {
"code": {
"description": "JSON-RPC error code for this failure.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"data": {
"additionalProperties": {},
"properties": {
"reason": {
"description": "Machine-readable failure mode. Declared by this tool: `blank_drug_name`: The drug name carries no searchable character — only quotes, backslashes, or whitespace. Other values are possible when a failure originates below the handler.",
"examples": [
"blank_drug_name"
],
"type": "string"
},
"recovery": {
"additionalProperties": {},
"description": "Actionable next step for the caller.",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"type": "object"
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"type": "object"
},
"message": {
"description": "Human-readable description of what went wrong.",
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"identity": {
"additionalProperties": false,
"description": "Identity resolved once and reused across every sub-query to avoid identifier drift.",
"properties": {
"brand_names": {
"description": "Brand names for the drug (openfda.brand_name).",
"items": {
"type": "string"
},
"type": "array"
},
"generic_name": {
"description": "Canonical generic name (openfda.generic_name) — the primary source for meta.fanOutKey.",
"type": [
"string",
"null"
]
},
"product_ndc": {
"description": "Representative product NDC, when available.",
"type": [
"string",
"null"
]
},
"rxcui": {
"description": "RxNorm concept unique identifier, when available.",
"type": [
"string",
"null"
]
},
"spl_set_id": {
"description": "SPL set ID for the drug label, when available.",
"type": [
"string",
"null"
]
}
},
"required": [
"brand_names",
"generic_name",
"product_ndc",
"rxcui",
"spl_set_id"
],
"type": "object"
},
"label": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"dosage": {
"description": "Dosage and administration (truncated).",
"type": [
"string",
"null"
]
},
"indications": {
"description": "Indications and usage (truncated).",
"type": [
"string",
"null"
]
},
"warnings": {
"description": "Warnings (truncated) — boxed warning or warnings_and_cautions for Rx labels, falling back to the OTC-monograph warnings section.",
"type": [
"string",
"null"
]
}
},
"required": [
"indications",
"warnings",
"dosage"
],
"type": "object"
},
{
"type": "null"
}
],
"description": "Label highlights from drug/label, or null when no label matched."
},
"meta": {
"additionalProperties": false,
"description": "Request metadata.",
"properties": {
"drug": {
"description": "The drug name supplied in the request, echoed back.",
"type": "string"
},
"fanOutKey": {
"description": "Canonical key the structured sub-queries (recall/enforcement, Drugs@FDA approval, shortage) ran against — the resolved generic name, falling back to a brand name, then the input term. The adverse-event sub-query instead keys off the raw input term to match heterogeneous reporter-entered values.",
"type": "string"
},
"resolvedVia": {
"description": "Which endpoint resolved the canonical identity: drug/label, drug/ndc, or none.",
"enum": [
"label",
"ndc",
"none"
],
"type": "string"
}
},
"required": [
"drug",
"resolvedVia",
"fanOutKey"
],
"type": "object"
},
"notice": {
"description": "Guidance when the drug could not be resolved or upstream errors degraded the profile. Absent on a fully populated profile.",
"type": "string"
},
"recalls": {
"description": "Recent drug/enforcement recall actions (may be empty).",
"items": {
"additionalProperties": false,
"description": "A single recall or enforcement action.",
"properties": {
"classification": {
"description": "Recall hazard class (Class I/II/III).",
"type": [
"string",
"null"
]
},
"date": {
"description": "Recall initiation or report date (YYYYMMDD).",
"type": [
"string",
"null"
]
},
"reason": {
"description": "Reason for recall (truncated).",
"type": [
"string",
"null"
]
},
"recalling_firm": {
"description": "Firm conducting the recall.",
"type": [
"string",
"null"
]
}
},
"required": [
"classification",
"reason",
"recalling_firm",
"date"
],
"type": "object"
},
"type": "array"
},
"sectionsFound": {
"description": "How many profile sections (label, adverse_events, recalls, approval, shortage) returned data.",
"type": "number"
},
"shortage": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"availability": {
"description": "Availability note (truncated).",
"type": [
"string",
"null"
]
},
"status": {
"description": "Shortage status (Current/Resolved).",
"type": [
"string",
"null"
]
}
},
"required": [
"status",
"availability"
],
"type": "object"
},
{
"type": "null"
}
],
"description": "Current or most-recent drug shortage status, or null when none on record."
}
},
"type": "object"
}
},
{
"description": "Look up FDA drug labeling (package inserts / SPL documents). Check indications, warnings, dosage, contraindications, active ingredients, or any structured label section. A label runs to tens of thousands of tokens, so a page that exceeds the inline budget returns the list of available sections instead; re-call with sections to pull the ones you need.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"limit": {
"default": 5,
"description": "Maximum number of results to return (1-1000). Default 5. Labels are large, and the cost of a sections selection is the section summed across every record on the page — so it scales with this limit. Lower it before widening a selection.",
"maximum": 1000,
"minimum": 1,
"type": "number"
},
"search": {
"description": "Query targeting label fields. Examples: openfda.brand_name:\"aspirin\", openfda.generic_name:\"metformin\", openfda.manufacturer_name:\"pfizer\". For a specific revision, pass set_id with the SPL UUID returned in earlier results. Double quotes, parentheses, and range brackets must balance, and the query must not end on a backslash — each is rejected before the request.",
"minLength": 1,
"pattern": "\\S",
"type": "string"
},
"sections": {
"description": "Label sections to return, e.g. [\"boxed_warning\",\"indications_and_usage\"]. Names come from the outline an oversized page returns, or from openfda_describe_fields. Omit for the whole label — which returns the section outline instead when the page exceeds the inline size budget; an empty list is treated as omitted. A selection is returned whole even when it exceeds that budget, with its serialized size reported on the notice; the outline names a section measured to fit at the requested limit. Sections ending in _table hold SPL table markup: raw in structured results, rendered as Markdown tables in the text output. Metadata (openfda, set_id, id, effective_time, version) is returned either way and counts toward the size.",
"items": {
"description": "A top-level label section name.",
"minLength": 1,
"pattern": "\\S",
"type": "string"
},
"type": "array"
},
"skip": {
"default": 0,
"description": "Number of records to skip for pagination (default 0). openFDA caps pagination at 25000 records; a higher value returns a pagination_limit_reached error.",
"minimum": 0,
"type": "number"
},
"sort": {
"description": "Sort expression — a field path optionally suffixed with :asc or :desc; comma-separate for multi-field sort. Example: effective_time:desc. Field paths take only letters, digits, underscores, and dots; anything else is rejected before the request. A well-formed but non-sortable field still causes a query error — use a documented field name.",
"minLength": 1,
"pattern": "^ *[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*(?::[^,:]*)?(?: *, *[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*(?::[^,:]*)?)* *$",
"type": "string"
}
},
"required": [
"search"
],
"type": "object"
},
"name": "openfda_get_drug_label",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"meta",
"kind",
"totalResults",
"effectiveQuery"
]
},
{
"required": [
"error"
]
}
],
"properties": {
"cap": {
"description": "The limit applied to this page.",
"type": "number"
},
"effectiveQuery": {
"description": "Search filter applied to the drug label query, as submitted to openFDA",
"type": "string"
},
"error": {
"additionalProperties": {},
"description": "Present when the call failed. Absent on success.",
"properties": {
"code": {
"description": "JSON-RPC error code for this failure.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"data": {
"additionalProperties": {},
"properties": {
"reason": {
"description": "Machine-readable failure mode. Declared by this tool: `rate_limited`: The openFDA daily or per-minute request limit is exceeded. `upstream_error`: The openFDA API returned a 5xx server error. `malformed_search`: The search query leaves a double quote, parenthesis, or range bracket unclosed, or ends on a backslash. `query_error`: The search query was rejected by openFDA (malformed field name, invalid syntax). `pagination_limit_reached`: skip exceeds the 25000 record pagination ceiling. Other values are possible when a failure originates below the handler.",
"examples": [
"rate_limited",
"upstream_error",
"malformed_search",
"query_error",
"pagination_limit_reached"
],
"type": "string"
},
"recovery": {
"additionalProperties": {},
"description": "Actionable next step for the caller.",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"type": "object"
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"type": "object"
},
"message": {
"description": "Human-readable description of what went wrong.",
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"kind": {
"description": "Whether this response carries label records (\"full\") or only the section outline of a page too large to inline (\"outline\").",
"enum": [
"full",
"outline"
],
"type": "string"
},
"meta": {
"additionalProperties": false,
"description": "Pagination and freshness metadata.",
"properties": {
"lastUpdated": {
"description": "Date the dataset was last updated.",
"type": "string"
},
"limit": {
"description": "Maximum results returned per request.",
"type": "number"
},
"skip": {
"description": "Number of results skipped.",
"type": "number"
},
"total": {
"description": "Total matching results in the dataset.",
"type": "number"
},
"totalUnverified": {
"description": "Present (true) only on an empty page at skip > 0 whose total could not be confirmed: openFDA answers a page past the end and a search that matched nothing alike, and the follow-up request for the total failed. total then reads 0 without ruling out records at a lower skip — re-call with skip=0 to tell.",
"type": "boolean"
}
},
"required": [
"total",
"skip",
"limit",
"lastUpdated"
],
"type": "object"
},
"notice": {
"description": "Guidance for this page: how to broaden filters or correct field names when results are empty or paging overshot, the sized re-call example when a page overflowed to its section outline, section names no record carried, and the serialized size when a sections selection exceeds the inline budget. Absent when nothing needs saying.",
"type": "string"
},
"outline": {
"description": "Section names available across the matched page and their serialized size, largest first. Present when kind is \"outline\" — pass names back in sections to retrieve them.",
"items": {
"additionalProperties": false,
"description": "One retrievable label section and its serialized size.",
"properties": {
"bytes": {
"description": "Serialized byte size of the section",
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"name": {
"description": "Section identifier — pass in `sections` to retrieve it",
"type": "string"
}
},
"required": [
"name",
"bytes"
],
"type": "object"
},
"type": "array"
},
"results": {
"description": "Drug label records, present when kind is \"full\". Each carries an openfda block (brand_name, generic_name, manufacturer_name, route) plus optional SPL sections like indications_and_usage, warnings, dosage_and_administration, contraindications, adverse_reactions; section presence varies per label. Sections ending in _table carry raw SPL table markup (tags and character entities) exactly as openFDA returns it. Narrowed to the requested sections plus metadata when sections was supplied.",
"items": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
"shown": {
"description": "Number of labels returned in this response.",
"type": "number"
},
"totalResults": {
"description": "Total matching label records in the dataset",
"type": "number"
},
"truncated": {
"description": "True when more labels matched than this page returned — page with skip for the rest.",
"type": "boolean"
}
},
"type": "object"
}
},
{
"description": "Look up drugs in the NDC (National Drug Code) Directory. Identify drug products by NDC code, find active ingredients, packaging details, or manufacturer info. Pair with openfda_get_drug_label using the returned brand_name or set_id to read the package insert. With stage=true, call openfda_dataframe_describe for the staged columns, then openfda_dataframe_query for SQL.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"canvas_id": {
"description": "Canvas ID returned by a prior stage=true call to this tool or an openFDA search tool (openfda_search_*). Passing one stages this lookup onto that canvas (same effect as stage=true) so result sets accumulate for cross-table joins. Omit to stage onto a fresh canvas.",
"pattern": "^[A-Za-z0-9_-]{10}$",
"type": "string"
},
"limit": {
"default": 10,
"description": "Maximum number of records to return (1-1000, default 10). Serialized record size varies by three orders of magnitude across openFDA endpoints, so the page is also bounded by a 24000-byte serialized budget: a page that would overrun it returns fewer records than requested and reports the cut on page_omitted. Whenever any record matched, at least one comes back, however large it measures. A record grows with its packaging list, so a product with many package configurations is several times the size of one with a single package.",
"maximum": 1000,
"minimum": 1,
"type": "number"
},
"search": {
"description": "openFDA search query. Examples: product_ndc:\"0363-0218\", brand_name:\"aspirin\", generic_name:\"metformin\", openfda.manufacturer_name:\"walgreen\", active_ingredients.name:\"ASPIRIN\". Double quotes, parentheses, and range brackets must balance, and the query must not end on a backslash — each is rejected before the request.",
"minLength": 1,
"pattern": "\\S",
"type": "string"
},
"skip": {
"default": 0,
"description": "Number of records to skip for pagination (default 0). openFDA caps pagination at 25000 records; a higher value returns a pagination_limit_reached error.",
"minimum": 0,
"type": "number"
},
"sort": {
"description": "Sort expression — a field path optionally suffixed with :asc or :desc; comma-separate for multi-field sort. Example: listing_expiration_date:desc. Field paths take only letters, digits, underscores, and dots; anything else is rejected before the request. A well-formed but non-sortable field still causes a query error — use a documented field name.",
"minLength": 1,
"pattern": "^ *[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*(?::[^,:]*)?(?: *, *[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*(?::[^,:]*)?)* *$",
"type": "string"
},
"stage": {
"default": false,
"description": "Stage the matched set on a DataCanvas for SQL analysis — openfda_dataframe_describe lists the staged columns, openfda_dataframe_query runs the SQL. Default false — the call returns one page for one upstream request. When true, records are also drained onto a canvas table up to a size budget (staged_rows reports how many reached it). Staging is for record-level SQL over a bounded slice; for a distribution over everything that matched, openfda_count_values aggregates server-side in one request. Requires CANVAS_PROVIDER_TYPE=duckdb.",
"type": "boolean"
}
},
"required": [
"search"
],
"type": "object"
},
"name": "openfda_lookup_ndc",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"meta",
"results",
"totalResults",
"effectiveQuery"
]
},
{
"required": [
"error"
]
}
],
"properties": {
"canvas_id": {
"description": "DataCanvas session id for the staged result set. Present when this call staged. Pass to openfda_dataframe_query / openfda_dataframe_describe, or back into this tool to accumulate more tables on the same canvas.",
"type": "string"
},
"canvas_table": {
"description": "Canvas table holding the staged rows. Present when rows were staged; list its columns with openfda_dataframe_describe, then reference it in openfda_dataframe_query FROM clauses.",
"type": "string"
},
"effectiveQuery": {
"description": "Search filter applied to the NDC lookup, as submitted to openFDA",
"type": "string"
},
"error": {
"additionalProperties": {},
"description": "Present when the call failed. Absent on success.",
"properties": {
"code": {
"description": "JSON-RPC error code for this failure.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"data": {
"additionalProperties": {},
"properties": {
"reason": {
"description": "Machine-readable failure mode. Declared by this tool: `canvas_disabled`: Staging was requested (stage=true or a canvas_id) but DataCanvas is disabled. `canvas_not_found`: The canvas_id is well-formed but names no active canvas — expired or never minted. `canvas_capacity_exhausted`: canvas_id was omitted and the active canvas cap is already reached. `rate_limited`: The openFDA daily or per-minute request limit is exceeded. `upstream_error`: The openFDA API returned a 5xx server error. `malformed_search`: The search query leaves a double quote, parenthesis, or range bracket unclosed, or ends on a backslash. `query_error`: The search query was rejected by openFDA (malformed field name, invalid syntax). `pagination_limit_reached`: skip exceeds the 25000 record pagination ceiling. Other values are possible when a failure originates below the handler.",
"examples": [
"canvas_disabled",
"canvas_not_found",
"canvas_capacity_exhausted",
"rate_limited",
"upstream_error",
"malformed_search",
"query_error",
"pagination_limit_reached"
],
"type": "string"
},
"recovery": {
"additionalProperties": {},
"description": "Actionable next step for the caller.",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"type": "object"
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"type": "object"
},
"message": {
"description": "Human-readable description of what went wrong.",
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"meta": {
"additionalProperties": false,
"description": "Response metadata",
"properties": {
"lastUpdated": {
"description": "Dataset last updated date",
"type": "string"
},
"limit": {
"description": "Page size applied to this request — the requested limit, lowered to the records returned when the 24000-byte inline budget bounded the page (see page_omitted). Not a count of what arrived: a window running past the end of the matched set returns fewer records than this, so read the length of results for the actual count.",
"type": "number"
},
"skip": {
"description": "Pagination offset",
"type": "number"
},
"total": {
"description": "Total matching records",
"type": "number"
},
"totalUnverified": {
"description": "Present (true) only on an empty page at skip > 0 whose total could not be confirmed: openFDA answers a page past the end and a search that matched nothing alike, and the follow-up request for the total failed. total then reads 0 without ruling out records at a lower skip — re-call with skip=0 to tell.",
"type": "boolean"
}
},
"required": [
"total",
"skip",
"limit",
"lastUpdated"
],
"type": "object"
},
"notice": {
"description": "Canvas staging disclosure when the call staged, the byte-budget disclosure and the routes to the withheld records when the inline page was bounded, and guidance when results are empty — how to broaden filters or correct field names.",
"type": "string"
},
"page_bytes": {
"description": "Serialized size of results in this response, in bytes. Present only when the 24000-byte inline budget bounded the page; larger than the budget only when a single record exceeds it on its own.",
"type": "number"
},
"page_omitted": {
"description": "Records dropped from the requested limit/skip window so the page fit the inline byte budget. Present only when the page was bounded. Read them by re-calling with skip advanced by the number of records returned, lower limit for a smaller page, or pass stage=true to query a bounded drain of the match with openfda_dataframe_query.",
"type": "number"
},
"results": {
"description": "NDC directory records — product_ndc, brand_name, generic_name, labeler_name, dosage_form, route, marketing_category, active_ingredients[], packaging[], listing_expiration_date.",
"items": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
"spilled": {
"description": "True when this call staged its matched set on the canvas — use canvas_id with openfda_dataframe_describe for its columns, then openfda_dataframe_query for SQL. Absent when staging was not requested.",
"type": "boolean"
},
"staged_rows": {
"description": "Rows written to the canvas table. Compare with meta.total: a smaller value means staging stopped at its size budget and the table holds only the first staged_rows records.",
"type": "number"
},
"totalResults": {
"description": "Total matching NDC records in the dataset",
"type": "number"
},
"truncated": {
"description": "True when fewer rows reached the canvas than matched upstream — staging stopped at its size budget or openFDA's 25000-row pagination ceiling. Narrow the query (filters, date range) for a complete set.",
"type": "boolean"
}
},
"type": "object"
}
},
{
"description": "Search adverse event reports across drugs, food, and devices. Use to investigate safety signals, find reports for a specific product, or explore reactions by demographics. With stage=true, call openfda_dataframe_describe for the staged columns, then openfda_dataframe_query for SQL.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"canvas_id": {
"description": "Canvas ID returned by a prior stage=true call to this tool or another openFDA search tool (openfda_search_* or openfda_lookup_ndc). Passing one stages this search onto that canvas (same effect as stage=true) so result sets accumulate for cross-table joins. Omit to stage onto a fresh canvas.",
"pattern": "^[A-Za-z0-9_-]{10}$",
"type": "string"
},
"category": {
"description": "Product category — each has different field schemas in the response",
"enum": [
"drug",
"food",
"device"
],
"type": "string"
},
"limit": {
"default": 10,
"description": "Maximum number of records to return (1-1000, default 10). Serialized record size varies by three orders of magnitude across openFDA endpoints, so the page is also bounded by a 24000-byte serialized budget: a page that would overrun it returns fewer records than requested and reports the cut on page_omitted. Whenever any record matched, at least one comes back, however large it measures. Drug reports are by far the largest — a single drug/event report averages tens of kilobytes where a food/event report is a few hundred bytes.",
"maximum": 1000,
"minimum": 1,
"type": "number"
},
"search": {
"description": "openFDA search query. Examples: patient.drug.medicinalproduct:\"aspirin\", patient.reaction.reactionmeddrapt:\"nausea\" AND serious:\"1\". Omit to browse recent. Double quotes, parentheses, and range brackets must balance, and the query must not end on a backslash — each is rejected before the request.",
"minLength": 1,
"pattern": "\\S",
"type": "string"
},
"skip": {
"default": 0,
"description": "Number of records to skip for pagination (default 0). openFDA caps pagination at 25000 records; a higher value returns a pagination_limit_reached error.",
"minimum": 0,
"type": "number"
},
"sort": {
"description": "Sort expression — a field path optionally suffixed with :asc or :desc; comma-separate for multi-field sort. Field paths take only letters, digits, underscores, and dots; anything else is rejected before the request. Sortable date fields are category-specific: drug → receivedate:desc (or receiptdate), food → date_created:desc (or date_started), device → date_received:desc (or date_of_event). A field from another category (e.g. receivedate on food or device) causes a query error — use the field for this category.",
"minLength": 1,
"pattern": "^ *[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*(?::[^,:]*)?(?: *, *[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*(?::[^,:]*)?)* *$",
"type": "string"
},
"stage": {
"default": false,
"description": "Stage the matched set on a DataCanvas for SQL analysis — openfda_dataframe_describe lists the staged columns, openfda_dataframe_query runs the SQL. Default false — the call returns one page for one upstream request. When true, records are also drained onto a canvas table up to a size budget (staged_rows reports how many reached it). Staging is for record-level SQL over a bounded slice; for a distribution over everything that matched, openfda_count_values aggregates server-side in one request. Requires CANVAS_PROVIDER_TYPE=duckdb.",
"type": "boolean"
}
},
"required": [
"category"
],
"type": "object"
},
"name": "openfda_search_adverse_events",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"meta",
"results",
"totalResults"
]
},
{
"required": [
"error"
]
}
],
"properties": {
"canvas_id": {
"description": "DataCanvas session id for the staged result set. Present when this call staged. Pass to openfda_dataframe_query / openfda_dataframe_describe, or back into this tool to accumulate more tables on the same canvas.",
"type": "string"
},
"canvas_table": {
"description": "Canvas table holding the staged rows. Present when rows were staged; list its columns with openfda_dataframe_describe, then reference it in openfda_dataframe_query FROM clauses.",
"type": "string"
},
"effectiveQuery": {
"description": "Search filter applied to the query, as submitted to openFDA",
"type": "string"
},
"error": {
"additionalProperties": {},
"description": "Present when the call failed. Absent on success.",
"properties": {
"code": {
"description": "JSON-RPC error code for this failure.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"data": {
"additionalProperties": {},
"properties": {
"reason": {
"description": "Machine-readable failure mode. Declared by this tool: `canvas_disabled`: Staging was requested (stage=true or a canvas_id) but DataCanvas is disabled. `canvas_not_found`: The canvas_id is well-formed but names no active canvas — expired or never minted. `canvas_capacity_exhausted`: canvas_id was omitted and the active canvas cap is already reached. `rate_limited`: The openFDA daily or per-minute request limit is exceeded. `upstream_error`: The openFDA API returned a 5xx server error. `malformed_search`: The search query leaves a double quote, parenthesis, or range bracket unclosed, or ends on a backslash. `query_error`: The search query was rejected by openFDA (malformed field name, invalid syntax). `pagination_limit_reached`: skip exceeds the 25000 record pagination ceiling. Other values are possible when a failure originates below the handler.",
"examples": [
"canvas_disabled",
"canvas_not_found",
"canvas_capacity_exhausted",
"rate_limited",
"upstream_error",
"malformed_search",
"query_error",
"pagination_limit_reached"
],
"type": "string"
},
"recovery": {
"additionalProperties": {},
"description": "Actionable next step for the caller.",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"type": "object"
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"type": "object"
},
"message": {
"description": "Human-readable description of what went wrong.",
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"meta": {
"additionalProperties": false,
"description": "Response metadata",
"properties": {
"lastUpdated": {
"description": "Dataset last updated date",
"type": "string"
},
"limit": {
"description": "Page size applied to this request — the requested limit, lowered to the records returned when the 24000-byte inline budget bounded the page (see page_omitted). Not a count of what arrived: a window running past the end of the matched set returns fewer records than this, so read the length of results for the actual count.",
"type": "number"
},
"skip": {
"description": "Pagination offset",
"type": "number"
},
"total": {
"description": "Total matching records in the database",
"type": "number"
},
"totalUnverified": {
"description": "Present (true) only on an empty page at skip > 0 whose total could not be confirmed: openFDA answers a page past the end and a search that matched nothing alike, and the follow-up request for the total failed. total then reads 0 without ruling out records at a lower skip — re-call with skip=0 to tell.",
"type": "boolean"
}
},
"required": [
"total",
"skip",
"limit",
"lastUpdated"
],
"type": "object"
},
"notice": {
"description": "Canvas staging disclosure when the call staged, the byte-budget disclosure and the routes to the withheld records when the inline page was bounded, and guidance when results are empty or paging overshot — how to broaden filters or adjust the query.",
"type": "string"
},
"page_bytes": {
"description": "Serialized size of results in this response, in bytes. Present only when the 24000-byte inline budget bounded the page; larger than the budget only when a single record exceeds it on its own.",
"type": "number"
},
"page_omitted": {
"description": "Records dropped from the requested limit/skip window so the page fit the inline byte budget. Present only when the page was bounded. Read them by re-calling with skip advanced by the number of records returned, lower limit for a smaller page, or pass stage=true to query a bounded drain of the match with openfda_dataframe_query.",
"type": "number"
},
"results": {
"description": "Adverse event records — fields vary by category (drug: patient/reactions/drugs, device: device details/event type, food: products/outcomes)",
"items": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
"spilled": {
"description": "True when this call staged its matched set on the canvas — use canvas_id with openfda_dataframe_describe for its columns, then openfda_dataframe_query for SQL. Absent when staging was not requested.",
"type": "boolean"
},
"staged_rows": {
"description": "Rows written to the canvas table. Compare with meta.total: a smaller value means staging stopped at its size budget and the table holds only the first staged_rows records.",
"type": "number"
},
"totalResults": {
"description": "Total matching adverse event records in the dataset",
"type": "number"
},
"truncated": {
"description": "True when fewer rows reached the canvas than matched upstream — staging stopped at its size budget or openFDA's 25000-row pagination ceiling. Narrow the query (filters, date range) for a complete set.",
"type": "boolean"
}
},
"type": "object"
}
},
{
"description": "Search adverse event reports for veterinary drugs and devices submitted to the FDA Center for Veterinary Medicine. Records include animal species, breed, age, weight, drug name and route, adverse reactions (using VeDDRA terminology), and outcome. Use to investigate safety signals for veterinary products, find reports by animal species or drug, or explore reaction patterns. With stage=true, call openfda_dataframe_describe for the staged columns, then openfda_dataframe_query for SQL.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"canvas_id": {
"description": "Canvas ID returned by a prior stage=true call to this tool or another openFDA search tool (openfda_search_* or openfda_lookup_ndc). Passing one stages this search onto that canvas (same effect as stage=true) so result sets accumulate for cross-table joins. Omit to stage onto a fresh canvas.",
"pattern": "^[A-Za-z0-9_-]{10}$",
"type": "string"
},
"limit": {
"default": 10,
"description": "Maximum number of records to return (1-1000, default 10). Serialized record size varies by three orders of magnitude across openFDA endpoints, so the page is also bounded by a 24000-byte serialized budget: a page that would overrun it returns fewer records than requested and reports the cut on page_omitted. Whenever any record matched, at least one comes back, however large it measures.",
"maximum": 1000,
"minimum": 1,
"type": "number"
},
"search": {
"description": "openFDA search query using field:value syntax. Examples: animal.species:\"Dog\", drug.brand_name:\"Bravecto\", reaction.veddra_term_name:\"Vomiting\", serious_ae:\"true\". Omit to browse recent reports. Double quotes, parentheses, and range brackets must balance, and the query must not end on a backslash — each is rejected before the request.",
"minLength": 1,
"pattern": "\\S",
"type": "string"
},
"skip": {
"default": 0,
"description": "Number of records to skip for pagination (default 0). openFDA caps pagination at 25000 records; a higher value returns a pagination_limit_reached error.",
"minimum": 0,
"type": "number"
},
"sort": {
"description": "Sort expression — a field path optionally suffixed with :asc or :desc; comma-separate for multi-field sort. Example: original_receive_date:desc. Field paths take only letters, digits, underscores, and dots; anything else is rejected before the request. A well-formed but non-sortable field still causes a query error — use a documented field name.",
"minLength": 1,
"pattern": "^ *[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*(?::[^,:]*)?(?: *, *[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*(?::[^,:]*)?)* *$",
"type": "string"
},
"stage": {
"default": false,
"description": "Stage the matched set on a DataCanvas for SQL analysis — openfda_dataframe_describe lists the staged columns, openfda_dataframe_query runs the SQL. Default false — the call returns one page for one upstream request. When true, records are also drained onto a canvas table up to a size budget (staged_rows reports how many reached it). Staging is for record-level SQL over a bounded slice; for a distribution over everything that matched, openfda_count_values aggregates server-side in one request. Requires CANVAS_PROVIDER_TYPE=duckdb.",
"type": "boolean"
}
},
"type": "object"
},
"name": "openfda_search_animal_events",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"meta",
"results",
"totalResults"
]
},
{
"required": [
"error"
]
}
],
"properties": {
"canvas_id": {
"description": "DataCanvas session id for the staged result set. Present when this call staged. Pass to openfda_dataframe_query / openfda_dataframe_describe, or back into this tool to accumulate more tables on the same canvas.",
"type": "string"
},
"canvas_table": {
"description": "Canvas table holding the staged rows. Present when rows were staged; list its columns with openfda_dataframe_describe, then reference it in openfda_dataframe_query FROM clauses.",
"type": "string"
},
"effectiveQuery": {
"description": "Search filter applied to the query, as submitted to openFDA",
"type": "string"
},
"error": {
"additionalProperties": {},
"description": "Present when the call failed. Absent on success.",
"properties": {
"code": {
"description": "JSON-RPC error code for this failure.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"data": {
"additionalProperties": {},
"properties": {
"reason": {
"description": "Machine-readable failure mode. Declared by this tool: `canvas_disabled`: Staging was requested (stage=true or a canvas_id) but DataCanvas is disabled. `canvas_not_found`: The canvas_id is well-formed but names no active canvas — expired or never minted. `canvas_capacity_exhausted`: canvas_id was omitted and the active canvas cap is already reached. `rate_limited`: The openFDA daily or per-minute request limit is exceeded. `upstream_error`: The openFDA API returned a 5xx server error. `malformed_search`: The search query leaves a double quote, parenthesis, or range bracket unclosed, or ends on a backslash. `query_error`: The search query was rejected by openFDA (malformed field name, invalid syntax). `pagination_limit_reached`: skip exceeds the 25000 record pagination ceiling. Other values are possible when a failure originates below the handler.",
"examples": [
"canvas_disabled",
"canvas_not_found",
"canvas_capacity_exhausted",
"rate_limited",
"upstream_error",
"malformed_search",
"query_error",
"pagination_limit_reached"
],
"type": "string"
},
"recovery": {
"additionalProperties": {},
"description": "Actionable next step for the caller.",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"type": "object"
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"type": "object"
},
"message": {
"description": "Human-readable description of what went wrong.",
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"meta": {
"additionalProperties": false,
"description": "Response metadata",
"properties": {
"lastUpdated": {
"description": "Dataset last updated date",
"type": "string"
},
"limit": {
"description": "Page size applied to this request — the requested limit, lowered to the records returned when the 24000-byte inline budget bounded the page (see page_omitted). Not a count of what arrived: a window running past the end of the matched set returns fewer records than this, so read the length of results for the actual count.",
"type": "number"
},
"skip": {
"description": "Pagination offset",
"type": "number"
},
"total": {
"description": "Total matching records in the dataset",
"type": "number"
},
"totalUnverified": {
"description": "Present (true) only on an empty page at skip > 0 whose total could not be confirmed: openFDA answers a page past the end and a search that matched nothing alike, and the follow-up request for the total failed. total then reads 0 without ruling out records at a lower skip — re-call with skip=0 to tell.",
"type": "boolean"
}
},
"required": [
"total",
"skip",
"limit",
"lastUpdated"
],
"type": "object"
},
"notice": {
"description": "Canvas staging disclosure when the call staged, the byte-budget disclosure and the routes to the withheld records when the inline page was bounded, and guidance when results are empty or paging overshot — how to broaden filters or adjust the query.",
"type": "string"
},
"page_bytes": {
"description": "Serialized size of results in this response, in bytes. Present only when the 24000-byte inline budget bounded the page; larger than the budget only when a single record exceeds it on its own.",
"type": "number"
},
"page_omitted": {
"description": "Records dropped from the requested limit/skip window so the page fit the inline byte budget. Present only when the page was bounded. Read them by re-calling with skip advanced by the number of records returned, lower limit for a smaller page, or pass stage=true to query a bounded drain of the match with openfda_dataframe_query.",
"type": "number"
},
"results": {
"description": "Animal adverse event records. Key fields: unique_aer_id_number, original_receive_date, serious_ae, animal (species, gender, breed, age, weight), drug[] (brand_name, active_ingredients, route, dose, administered_by), reaction[] (veddra_term_name, number_of_animals_affected), outcome[] (medical_status), primary_reporter, type_of_information.",
"items": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
"spilled": {
"description": "True when this call staged its matched set on the canvas — use canvas_id with openfda_dataframe_describe for its columns, then openfda_dataframe_query for SQL. Absent when staging was not requested.",
"type": "boolean"
},
"staged_rows": {
"description": "Rows written to the canvas table. Compare with meta.total: a smaller value means staging stopped at its size budget and the table holds only the first staged_rows records.",
"type": "number"
},
"totalResults": {
"description": "Total matching animal adverse event records in the dataset",
"type": "number"
},
"truncated": {
"description": "True when fewer rows reached the canvas than matched upstream — staging stopped at its size budget or openFDA's 25000-row pagination ceiling. Narrow the query (filters, date range) for a complete set.",
"type": "boolean"
}
},
"type": "object"
}
},
{
"description": "Search FDA device premarket notifications — 510(k) clearances and PMA approvals. With stage=true, call openfda_dataframe_describe for the staged columns, then openfda_dataframe_query for SQL.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"canvas_id": {
"description": "Canvas ID returned by a prior stage=true call to this tool or another openFDA search tool (openfda_search_* or openfda_lookup_ndc). Passing one stages this search onto that canvas (same effect as stage=true) so result sets accumulate for cross-table joins. Omit to stage onto a fresh canvas.",
"pattern": "^[A-Za-z0-9_-]{10}$",
"type": "string"
},
"limit": {
"default": 10,
"description": "Maximum number of records to return (1-1000, default 10). Serialized record size varies by three orders of magnitude across openFDA endpoints, so the page is also bounded by a 24000-byte serialized budget: a page that would overrun it returns fewer records than requested and reports the cut on page_omitted. Whenever any record matched, at least one comes back, however large it measures. A 510(k) record carries a summary narrative and is several times the size of a PMA record.",
"maximum": 1000,
"minimum": 1,
"type": "number"
},
"pathway": {
"description": "Premarket pathway. 510(k) is the most common; PMA is for higher-risk devices.",
"enum": [
"510k",
"pma"
],
"type": "string"
},
"search": {
"description": "openFDA search query. Examples: applicant:\"medtronic\", advisory_committee_description:\"cardiovascular\", product_code:\"DXN\", openfda.device_name:\"catheter\". Omit to browse recent. Double quotes, parentheses, and range brackets must balance, and the query must not end on a backslash — each is rejected before the request.",
"minLength": 1,
"pattern": "\\S",
"type": "string"
},
"skip": {
"default": 0,
"description": "Number of records to skip for pagination (default 0). openFDA caps pagination at 25000 records; a higher value returns a pagination_limit_reached error.",
"minimum": 0,
"type": "number"
},
"sort": {
"description": "Sort expression — a field path optionally suffixed with :asc or :desc; comma-separate for multi-field sort. Example: decision_date:desc. Field paths take only letters, digits, underscores, and dots; anything else is rejected before the request. A well-formed but non-sortable field still causes a query error — use a documented field name.",
"minLength": 1,
"pattern": "^ *[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*(?::[^,:]*)?(?: *, *[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*(?::[^,:]*)?)* *$",
"type": "string"
},
"stage": {
"default": false,
"description": "Stage the matched set on a DataCanvas for SQL analysis — openfda_dataframe_describe lists the staged columns, openfda_dataframe_query runs the SQL. Default false — the call returns one page for one upstream request. When true, records are also drained onto a canvas table up to a size budget (staged_rows reports how many reached it). Staging is for record-level SQL over a bounded slice; for a distribution over everything that matched, openfda_count_values aggregates server-side in one request. Requires CANVAS_PROVIDER_TYPE=duckdb.",
"type": "boolean"
}
},
"required": [
"pathway"
],
"type": "object"
},
"name": "openfda_search_device_clearances",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"meta",
"results",
"totalResults"
]
},
{
"required": [
"error"
]
}
],
"properties": {
"canvas_id": {
"description": "DataCanvas session id for the staged result set. Present when this call staged. Pass to openfda_dataframe_query / openfda_dataframe_describe, or back into this tool to accumulate more tables on the same canvas.",
"type": "string"
},
"canvas_table": {
"description": "Canvas table holding the staged rows. Present when rows were staged; list its columns with openfda_dataframe_describe, then reference it in openfda_dataframe_query FROM clauses.",
"type": "string"
},
"effectiveQuery": {
"description": "Search filter applied to the device clearance query, as submitted to openFDA",
"type": "string"
},
"error": {
"additionalProperties": {},
"description": "Present when the call failed. Absent on success.",
"properties": {
"code": {
"description": "JSON-RPC error code for this failure.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"data": {
"additionalProperties": {},
"properties": {
"reason": {
"description": "Machine-readable failure mode. Declared by this tool: `canvas_disabled`: Staging was requested (stage=true or a canvas_id) but DataCanvas is disabled. `canvas_not_found`: The canvas_id is well-formed but names no active canvas — expired or never minted. `canvas_capacity_exhausted`: canvas_id was omitted and the active canvas cap is already reached. `rate_limited`: The openFDA daily or per-minute request limit is exceeded. `upstream_error`: The openFDA API returned a 5xx server error. `malformed_search`: The search query leaves a double quote, parenthesis, or range bracket unclosed, or ends on a backslash. `query_error`: The search query was rejected by openFDA (malformed field name, invalid syntax). `pagination_limit_reached`: skip exceeds the 25000 record pagination ceiling. Other values are possible when a failure originates below the handler.",
"examples": [
"canvas_disabled",
"canvas_not_found",
"canvas_capacity_exhausted",
"rate_limited",
"upstream_error",
"malformed_search",
"query_error",
"pagination_limit_reached"
],
"type": "string"
},
"recovery": {
"additionalProperties": {},
"description": "Actionable next step for the caller.",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"type": "object"
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"type": "object"
},
"message": {
"description": "Human-readable description of what went wrong.",
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"meta": {
"additionalProperties": false,
"description": "Response metadata",
"properties": {
"lastUpdated": {
"description": "Dataset last updated date",
"type": "string"
},
"limit": {
"description": "Page size applied to this request — the requested limit, lowered to the records returned when the 24000-byte inline budget bounded the page (see page_omitted). Not a count of what arrived: a window running past the end of the matched set returns fewer records than this, so read the length of results for the actual count.",
"type": "number"
},
"skip": {
"description": "Pagination offset",
"type": "number"
},
"total": {
"description": "Total matching records",
"type": "number"
},
"totalUnverified": {
"description": "Present (true) only on an empty page at skip > 0 whose total could not be confirmed: openFDA answers a page past the end and a search that matched nothing alike, and the follow-up request for the total failed. total then reads 0 without ruling out records at a lower skip — re-call with skip=0 to tell.",
"type": "boolean"
}
},
"required": [
"total",
"skip",
"limit",
"lastUpdated"
],
"type": "object"
},
"notice": {
"description": "Canvas staging disclosure when the call staged, the byte-budget disclosure and the routes to the withheld records when the inline page was bounded, and guidance when results are empty — how to broaden filters or correct field names.",
"type": "string"
},
"page_bytes": {
"description": "Serialized size of results in this response, in bytes. Present only when the 24000-byte inline budget bounded the page; larger than the budget only when a single record exceeds it on its own.",
"type": "number"
},
"page_omitted": {
"description": "Records dropped from the requested limit/skip window so the page fit the inline byte budget. Present only when the page was bounded. Read them by re-calling with skip advanced by the number of records returned, lower limit for a smaller page, or pass stage=true to query a bounded drain of the match with openfda_dataframe_query.",
"type": "number"
},
"results": {
"description": "510(k) or PMA records — 510(k) carries k_number, device_name, applicant, product_code, decision_date, decision_description, advisory_committee_description; PMA carries pma_number, trade_name, generic_name, supplement_number plus shared applicant/product_code/decision_date/decision_description.",
"items": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
"spilled": {
"description": "True when this call staged its matched set on the canvas — use canvas_id with openfda_dataframe_describe for its columns, then openfda_dataframe_query for SQL. Absent when staging was not requested.",
"type": "boolean"
},
"staged_rows": {
"description": "Rows written to the canvas table. Compare with meta.total: a smaller value means staging stopped at its size budget and the table holds only the first staged_rows records.",
"type": "number"
},
"totalResults": {
"description": "Total matching device clearance records in the dataset",
"type": "number"
},
"truncated": {
"description": "True when fewer rows reached the canvas than matched upstream — staging stopped at its size budget or openFDA's 25000-row pagination ceiling. Narrow the query (filters, date range) for a complete set.",
"type": "boolean"
}
},
"type": "object"
}
},
{
"description": "Search the Drugs@FDA database for drug application approvals (NDAs and ANDAs). Returns application details, sponsor info, and full submission history. Pair with openfda_get_drug_label to read the approved label, or openfda_count_values to aggregate by sponsor_name, product_type, or route. With stage=true, call openfda_dataframe_describe for the staged columns, then openfda_dataframe_query for SQL.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"canvas_id": {
"description": "Canvas ID returned by a prior stage=true call to this tool or another openFDA search tool (openfda_search_* or openfda_lookup_ndc). Passing one stages this search onto that canvas (same effect as stage=true) so result sets accumulate for cross-table joins. Omit to stage onto a fresh canvas.",
"pattern": "^[A-Za-z0-9_-]{10}$",
"type": "string"
},
"limit": {
"default": 10,
"description": "Maximum number of records to return (1-1000, default 10). Serialized record size varies by three orders of magnitude across openFDA endpoints, so the page is also bounded by a 24000-byte serialized budget: a page that would overrun it returns fewer records than requested and reports the cut on page_omitted. Whenever any record matched, at least one comes back, however large it measures. A record carries its application's whole submission history, so a long-running application is an order of magnitude larger than a recent one.",
"maximum": 1000,
"minimum": 1,
"type": "number"
},
"search": {
"description": "openFDA search query. Examples: openfda.brand_name:\"humira\", sponsor_name:\"PFIZER\", submissions.submission_type:\"ORIG\" AND submissions.review_priority:\"PRIORITY\". Exact quoted values can be case-sensitive on some fields — sponsor_name is stored uppercase, so use sponsor_name:\"PFIZER\" (a lowercase quoted value returns no matches). Omit to browse recent. Double quotes, parentheses, and range brackets must balance, and the query must not end on a backslash — each is rejected before the request.",
"minLength": 1,
"pattern": "\\S",
"type": "string"
},
"skip": {
"default": 0,
"description": "Number of records to skip for pagination (default 0). openFDA caps pagination at 25000 records; a higher value returns a pagination_limit_reached error.",
"minimum": 0,
"type": "number"
},
"sort": {
"description": "Sort expression — a field path optionally suffixed with :asc or :desc; comma-separate for multi-field sort. Example: submissions.submission_status_date:desc. Field paths take only letters, digits, underscores, and dots; anything else is rejected before the request. A well-formed but non-sortable field still causes a query error — use a documented field name.",
"minLength": 1,
"pattern": "^ *[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*(?::[^,:]*)?(?: *, *[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*(?::[^,:]*)?)* *$",
"type": "string"
},
"stage": {
"default": false,
"description": "Stage the matched set on a DataCanvas for SQL analysis — openfda_dataframe_describe lists the staged columns, openfda_dataframe_query runs the SQL. Default false — the call returns one page for one upstream request. When true, records are also drained onto a canvas table up to a size budget (staged_rows reports how many reached it). Staging is for record-level SQL over a bounded slice; for a distribution over everything that matched, openfda_count_values aggregates server-side in one request. Requires CANVAS_PROVIDER_TYPE=duckdb.",
"type": "boolean"
}
},
"type": "object"
},
"name": "openfda_search_drug_approvals",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"meta",
"results",
"totalResults"
]
},
{
"required": [
"error"
]
}
],
"properties": {
"canvas_id": {
"description": "DataCanvas session id for the staged result set. Present when this call staged. Pass to openfda_dataframe_query / openfda_dataframe_describe, or back into this tool to accumulate more tables on the same canvas.",
"type": "string"
},
"canvas_table": {
"description": "Canvas table holding the staged rows. Present when rows were staged; list its columns with openfda_dataframe_describe, then reference it in openfda_dataframe_query FROM clauses.",
"type": "string"
},
"effectiveQuery": {
"description": "Search filter applied to the Drugs@FDA query, as submitted to openFDA",
"type": "string"
},
"error": {
"additionalProperties": {},
"description": "Present when the call failed. Absent on success.",
"properties": {
"code": {
"description": "JSON-RPC error code for this failure.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"data": {
"additionalProperties": {},
"properties": {
"reason": {
"description": "Machine-readable failure mode. Declared by this tool: `canvas_disabled`: Staging was requested (stage=true or a canvas_id) but DataCanvas is disabled. `canvas_not_found`: The canvas_id is well-formed but names no active canvas — expired or never minted. `canvas_capacity_exhausted`: canvas_id was omitted and the active canvas cap is already reached. `rate_limited`: The openFDA daily or per-minute request limit is exceeded. `upstream_error`: The openFDA API returned a 5xx server error. `malformed_search`: The search query leaves a double quote, parenthesis, or range bracket unclosed, or ends on a backslash. `query_error`: The search query was rejected by openFDA (malformed field name, invalid syntax). `pagination_limit_reached`: skip exceeds the 25000 record pagination ceiling. Other values are possible when a failure originates below the handler.",
"examples": [
"canvas_disabled",
"canvas_not_found",
"canvas_capacity_exhausted",
"rate_limited",
"upstream_error",
"malformed_search",
"query_error",
"pagination_limit_reached"
],
"type": "string"
},
"recovery": {
"additionalProperties": {},
"description": "Actionable next step for the caller.",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"type": "object"
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"type": "object"
},
"message": {
"description": "Human-readable description of what went wrong.",
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"meta": {
"additionalProperties": false,
"description": "Response metadata",
"properties": {
"lastUpdated": {
"description": "Dataset last updated date",
"type": "string"
},
"limit": {
"description": "Page size applied to this request — the requested limit, lowered to the records returned when the 24000-byte inline budget bounded the page (see page_omitted). Not a count of what arrived: a window running past the end of the matched set returns fewer records than this, so read the length of results for the actual count.",
"type": "number"
},
"skip": {
"description": "Pagination offset",
"type": "number"
},
"total": {
"description": "Total matching records",
"type": "number"
},
"totalUnverified": {
"description": "Present (true) only on an empty page at skip > 0 whose total could not be confirmed: openFDA answers a page past the end and a search that matched nothing alike, and the follow-up request for the total failed. total then reads 0 without ruling out records at a lower skip — re-call with skip=0 to tell.",
"type": "boolean"
}
},
"required": [
"total",
"skip",
"limit",
"lastUpdated"
],
"type": "object"
},
"notice": {
"description": "Canvas staging disclosure when the call staged, the byte-budget disclosure and the routes to the withheld records when the inline page was bounded, and guidance when results are empty — how to broaden filters or correct field names.",
"type": "string"
},
"page_bytes": {
"description": "Serialized size of results in this response, in bytes. Present only when the 24000-byte inline budget bounded the page; larger than the budget only when a single record exceeds it on its own.",
"type": "number"
},
"page_omitted": {
"description": "Records dropped from the requested limit/skip window so the page fit the inline byte budget. Present only when the page was bounded. Read them by re-calling with skip advanced by the number of records returned, lower limit for a smaller page, or pass stage=true to query a bounded drain of the match with openfda_dataframe_query.",
"type": "number"
},
"results": {
"description": "Drug application records — application_number, sponsor_name, openfda block (brand_name, generic_name, route, product_type, substance_name), products[] (active_ingredients, dosage_form, marketing_status), submissions[] (submission_type, submission_status, submission_status_date, review_priority).",
"items": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
"spilled": {
"description": "True when this call staged its matched set on the canvas — use canvas_id with openfda_dataframe_describe for its columns, then openfda_dataframe_query for SQL. Absent when staging was not requested.",
"type": "boolean"
},
"staged_rows": {
"description": "Rows written to the canvas table. Compare with meta.total: a smaller value means staging stopped at its size budget and the table holds only the first staged_rows records.",
"type": "number"
},
"totalResults": {
"description": "Total matching drug approval records in the dataset",
"type": "number"
},
"truncated": {
"description": "True when fewer rows reached the canvas than matched upstream — staging stopped at its size budget or openFDA's 25000-row pagination ceiling. Narrow the query (filters, date range) for a complete set.",
"type": "boolean"
}
},
"type": "object"
}
},
{
"description": "Search FDA drug shortage records. Returns per-product shortage status, availability, therapeutic category, dosage form, manufacturer, and dates. Use to check whether a drug is currently in shortage, find all oncology drugs with supply issues, or retrieve the openfda block (brand_name, product_ndc, rxcui) to chain into openfda_get_drug_label or openfda_lookup_ndc. With stage=true, call openfda_dataframe_describe for the staged columns, then openfda_dataframe_query for SQL.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"canvas_id": {
"description": "Canvas ID returned by a prior stage=true call to this tool or another openFDA search tool (openfda_search_* or openfda_lookup_ndc). Passing one stages this search onto that canvas (same effect as stage=true) so result sets accumulate for cross-table joins. Omit to stage onto a fresh canvas.",
"pattern": "^[A-Za-z0-9_-]{10}$",
"type": "string"
},
"limit": {
"default": 10,
"description": "Maximum number of records to return (1-1000, default 10). Serialized record size varies by three orders of magnitude across openFDA endpoints, so the page is also bounded by a 24000-byte serialized budget: a page that would overrun it returns fewer records than requested and reports the cut on page_omitted. Whenever any record matched, at least one comes back, however large it measures.",
"maximum": 1000,
"minimum": 1,
"type": "number"
},
"search": {
"description": "openFDA search query using field:value syntax. Examples: status:\"Current\", therapeutic_category:\"Oncology\", generic_name:\"carboplatin\", company_name:\"pfizer\". Omit to browse all records. Double quotes, parentheses, and range brackets must balance, and the query must not end on a backslash — each is rejected before the request. Call openfda_describe_fields({ endpoint: \"drug/shortages\" }) for the complete field list.",
"minLength": 1,
"pattern": "\\S",
"type": "string"
},
"skip": {
"default": 0,
"description": "Number of records to skip for pagination (default 0). openFDA caps pagination at 25000 records; a higher value returns a pagination_limit_reached error.",
"minimum": 0,
"type": "number"
},
"sort": {
"description": "Sort expression — a field path optionally suffixed with :asc or :desc; comma-separate for multi-field sort. Example: update_date:desc. Field paths take only letters, digits, underscores, and dots; anything else is rejected before the request. A well-formed but non-sortable field still causes a query error — use a documented field name.",
"minLength": 1,
"pattern": "^ *[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*(?::[^,:]*)?(?: *, *[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*(?::[^,:]*)?)* *$",
"type": "string"
},
"stage": {
"default": false,
"description": "Stage the matched set on a DataCanvas for SQL analysis — openfda_dataframe_describe lists the staged columns, openfda_dataframe_query runs the SQL. Default false — the call returns one page for one upstream request. When true, records are also drained onto a canvas table up to a size budget (staged_rows reports how many reached it). Staging is for record-level SQL over a bounded slice; for a distribution over everything that matched, openfda_count_values aggregates server-side in one request. Requires CANVAS_PROVIDER_TYPE=duckdb.",
"type": "boolean"
}
},
"type": "object"
},
"name": "openfda_search_drug_shortages",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"meta",
"results",
"totalResults"
]
},
{
"required": [
"error"
]
}
],
"properties": {
"canvas_id": {
"description": "DataCanvas session id for the staged result set. Present when this call staged. Pass to openfda_dataframe_query / openfda_dataframe_describe, or back into this tool to accumulate more tables on the same canvas.",
"type": "string"
},
"canvas_table": {
"description": "Canvas table holding the staged rows. Present when rows were staged; list its columns with openfda_dataframe_describe, then reference it in openfda_dataframe_query FROM clauses.",
"type": "string"
},
"effectiveQuery": {
"description": "Search filter applied to the drug/shortages query, as submitted to openFDA",
"type": "string"
},
"error": {
"additionalProperties": {},
"description": "Present when the call failed. Absent on success.",
"properties": {
"code": {
"description": "JSON-RPC error code for this failure.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"data": {
"additionalProperties": {},
"properties": {
"reason": {
"description": "Machine-readable failure mode. Declared by this tool: `canvas_disabled`: Staging was requested (stage=true or a canvas_id) but DataCanvas is disabled. `canvas_not_found`: The canvas_id is well-formed but names no active canvas — expired or never minted. `canvas_capacity_exhausted`: canvas_id was omitted and the active canvas cap is already reached. `rate_limited`: The openFDA daily or per-minute request limit is exceeded. `upstream_error`: The openFDA API returned a 5xx server error. `malformed_search`: The search query leaves a double quote, parenthesis, or range bracket unclosed, or ends on a backslash. `query_error`: The search query was rejected by openFDA (malformed field name, invalid syntax). `pagination_limit_reached`: skip exceeds the 25000 record pagination ceiling. Other values are possible when a failure originates below the handler.",
"examples": [
"canvas_disabled",
"canvas_not_found",
"canvas_capacity_exhausted",
"rate_limited",
"upstream_error",
"malformed_search",
"query_error",
"pagination_limit_reached"
],
"type": "string"
},
"recovery": {
"additionalProperties": {},
"description": "Actionable next step for the caller.",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"type": "object"
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"type": "object"
},
"message": {
"description": "Human-readable description of what went wrong.",
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"meta": {
"additionalProperties": false,
"description": "Response metadata",
"properties": {
"lastUpdated": {
"description": "Dataset last updated date",
"type": "string"
},
"limit": {
"description": "Page size applied to this request — the requested limit, lowered to the records returned when the 24000-byte inline budget bounded the page (see page_omitted). Not a count of what arrived: a window running past the end of the matched set returns fewer records than this, so read the length of results for the actual count.",
"type": "number"
},
"skip": {
"description": "Pagination offset",
"type": "number"
},
"total": {
"description": "Total matching shortage records in the database",
"type": "number"
},
"totalUnverified": {
"description": "Present (true) only on an empty page at skip > 0 whose total could not be confirmed: openFDA answers a page past the end and a search that matched nothing alike, and the follow-up request for the total failed. total then reads 0 without ruling out records at a lower skip — re-call with skip=0 to tell.",
"type": "boolean"
}
},
"required": [
"total",
"skip",
"limit",
"lastUpdated"
],
"type": "object"
},
"notice": {
"description": "Canvas staging disclosure when the call staged, the byte-budget disclosure and the routes to the withheld records when the inline page was bounded, and guidance when results are empty — how to broaden filters or correct field names.",
"type": "string"
},
"page_bytes": {
"description": "Serialized size of results in this response, in bytes. Present only when the 24000-byte inline budget bounded the page; larger than the budget only when a single record exceeds it on its own.",
"type": "number"
},
"page_omitted": {
"description": "Records dropped from the requested limit/skip window so the page fit the inline byte budget. Present only when the page was bounded. Read them by re-calling with skip advanced by the number of records returned, lower limit for a smaller page, or pass stage=true to query a bounded drain of the match with openfda_dataframe_query.",
"type": "number"
},
"results": {
"description": "Drug shortage records. Key fields: generic_name, status (\"Current\"/\"Resolved\"), availability, therapeutic_category, dosage_form, presentation, package_ndc, company_name, contact_info, initial_posting_date, update_date, update_type. openfda block contains brand_name, product_ndc, rxcui, spl_set_id for cross-linking.",
"items": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
"spilled": {
"description": "True when this call staged its matched set on the canvas — use canvas_id with openfda_dataframe_describe for its columns, then openfda_dataframe_query for SQL. Absent when staging was not requested.",
"type": "boolean"
},
"staged_rows": {
"description": "Rows written to the canvas table. Compare with meta.total: a smaller value means staging stopped at its size budget and the table holds only the first staged_rows records.",
"type": "number"
},
"totalResults": {
"description": "Total matching drug shortage records in the dataset",
"type": "number"
},
"truncated": {
"description": "True when fewer rows reached the canvas than matched upstream — staging stopped at its size budget or openFDA's 25000-row pagination ceiling. Narrow the query (filters, date range) for a complete set.",
"type": "boolean"
}
},
"type": "object"
}
},
{
"description": "Search enforcement reports and recall actions across drugs, food, and devices. With stage=true, call openfda_dataframe_describe for the staged columns, then openfda_dataframe_query for SQL.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"canvas_id": {
"description": "Canvas ID returned by a prior stage=true call to this tool or another openFDA search tool (openfda_search_* or openfda_lookup_ndc). Passing one stages this search onto that canvas (same effect as stage=true) so result sets accumulate for cross-table joins. Omit to stage onto a fresh canvas.",
"pattern": "^[A-Za-z0-9_-]{10}$",
"type": "string"
},
"category": {
"description": "Product category",
"enum": [
"drug",
"food",
"device"
],
"type": "string"
},
"endpoint": {
"default": "enforcement",
"description": "Report type. Default enforcement. The recall endpoint is only available for devices.",
"enum": [
"enforcement",
"recall"
],
"type": "string"
},
"limit": {
"default": 10,
"description": "Maximum number of records to return (1-1000, default 10). Serialized record size varies by three orders of magnitude across openFDA endpoints, so the page is also bounded by a 24000-byte serialized budget: a page that would overrun it returns fewer records than requested and reports the cut on page_omitted. Whenever any record matched, at least one comes back, however large it measures. Device records are the largest here — a device enforcement or recall record runs several kilobytes where a drug or food enforcement record is around one.",
"maximum": 1000,
"minimum": 1,
"type": "number"
},
"search": {
"description": "openFDA search query. Examples: classification:\"Class I\" (also \"Class II\" or \"Class III\"), recalling_firm:\"pfizer\", reason_for_recall:\"undeclared allergen\". Omit to browse recent. Double quotes, parentheses, and range brackets must balance, and the query must not end on a backslash — each is rejected before the request.",
"minLength": 1,
"pattern": "\\S",
"type": "string"
},
"skip": {
"default": 0,
"description": "Number of records to skip for pagination (default 0). openFDA caps pagination at 25000 records; a higher value returns a pagination_limit_reached error.",
"minimum": 0,
"type": "number"
},
"sort": {
"description": "Sort expression — a field path optionally suffixed with :asc or :desc; comma-separate for multi-field sort (e.g. report_date:desc,status.exact:asc). Field paths take only letters, digits, underscores, and dots; anything else is rejected before the request. A well-formed but non-sortable field still causes a query error — use a documented field name.",
"minLength": 1,
"pattern": "^ *[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*(?::[^,:]*)?(?: *, *[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*(?::[^,:]*)?)* *$",
"type": "string"
},
"stage": {
"default": false,
"description": "Stage the matched set on a DataCanvas for SQL analysis — openfda_dataframe_describe lists the staged columns, openfda_dataframe_query runs the SQL. Default false — the call returns one page for one upstream request. When true, records are also drained onto a canvas table up to a size budget (staged_rows reports how many reached it). Staging is for record-level SQL over a bounded slice; for a distribution over everything that matched, openfda_count_values aggregates server-side in one request. Requires CANVAS_PROVIDER_TYPE=duckdb.",
"type": "boolean"
}
},
"required": [
"category"
],
"type": "object"
},
"name": "openfda_search_recalls",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"meta",
"results",
"totalResults"
]
},
{
"required": [
"error"
]
}
],
"properties": {
"canvas_id": {
"description": "DataCanvas session id for the staged result set. Present when this call staged. Pass to openfda_dataframe_query / openfda_dataframe_describe, or back into this tool to accumulate more tables on the same canvas.",
"type": "string"
},
"canvas_table": {
"description": "Canvas table holding the staged rows. Present when rows were staged; list its columns with openfda_dataframe_describe, then reference it in openfda_dataframe_query FROM clauses.",
"type": "string"
},
"effectiveQuery": {
"description": "Search filter applied to the recall query, as submitted to openFDA",
"type": "string"
},
"error": {
"additionalProperties": {},
"description": "Present when the call failed. Absent on success.",
"properties": {
"code": {
"description": "JSON-RPC error code for this failure.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"data": {
"additionalProperties": {},
"properties": {
"reason": {
"description": "Machine-readable failure mode. Declared by this tool: `recall_endpoint_non_device`: The recall endpoint was requested for a non-device category. `canvas_disabled`: Staging was requested (stage=true or a canvas_id) but DataCanvas is disabled. `canvas_not_found`: The canvas_id is well-formed but names no active canvas — expired or never minted. `canvas_capacity_exhausted`: canvas_id was omitted and the active canvas cap is already reached. `rate_limited`: The openFDA daily or per-minute request limit is exceeded. `upstream_error`: The openFDA API returned a 5xx server error. `malformed_search`: The search query leaves a double quote, parenthesis, or range bracket unclosed, or ends on a backslash. `query_error`: The search query was rejected by openFDA (malformed field name, invalid syntax). `pagination_limit_reached`: skip exceeds the 25000 record pagination ceiling. Other values are possible when a failure originates below the handler.",
"examples": [
"recall_endpoint_non_device",
"canvas_disabled",
"canvas_not_found",
"canvas_capacity_exhausted",
"rate_limited",
"upstream_error",
"malformed_search",
"query_error",
"pagination_limit_reached"
],
"type": "string"
},
"recovery": {
"additionalProperties": {},
"description": "Actionable next step for the caller.",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"type": "object"
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"type": "object"
},
"message": {
"description": "Human-readable description of what went wrong.",
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"meta": {
"additionalProperties": false,
"description": "Response metadata",
"properties": {
"lastUpdated": {
"description": "Dataset last updated date",
"type": "string"
},
"limit": {
"description": "Page size applied to this request — the requested limit, lowered to the records returned when the 24000-byte inline budget bounded the page (see page_omitted). Not a count of what arrived: a window running past the end of the matched set returns fewer records than this, so read the length of results for the actual count.",
"type": "number"
},
"skip": {
"description": "Pagination offset",
"type": "number"
},
"total": {
"description": "Total matching records",
"type": "number"
},
"totalUnverified": {
"description": "Present (true) only on an empty page at skip > 0 whose total could not be confirmed: openFDA answers a page past the end and a search that matched nothing alike, and the follow-up request for the total failed. total then reads 0 without ruling out records at a lower skip — re-call with skip=0 to tell.",
"type": "boolean"
}
},
"required": [
"total",
"skip",
"limit",
"lastUpdated"
],
"type": "object"
},
"notice": {
"description": "Canvas staging disclosure when the call staged, the byte-budget disclosure and the routes to the withheld records when the inline page was bounded, and guidance when results are empty — how to broaden filters or correct field names.",
"type": "string"
},
"page_bytes": {
"description": "Serialized size of results in this response, in bytes. Present only when the 24000-byte inline budget bounded the page; larger than the budget only when a single record exceeds it on its own.",
"type": "number"
},
"page_omitted": {
"description": "Records dropped from the requested limit/skip window so the page fit the inline byte budget. Present only when the page was bounded. Read them by re-calling with skip advanced by the number of records returned, lower limit for a smaller page, or pass stage=true to query a bounded drain of the match with openfda_dataframe_query.",
"type": "number"
},
"results": {
"description": "Enforcement or recall records. Enforcement records (every category) carry recall_number, classification, status, voluntary_mandated, recalling_firm, product_description, reason_for_recall, distribution_pattern, report_date. Device recall records name identity product_res_number and status recall_status, add res_event_number and root_cause_description, share the firm, product, reason, and distribution fields, and carry no recall hazard classification.",
"items": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
"spilled": {
"description": "True when this call staged its matched set on the canvas — use canvas_id with openfda_dataframe_describe for its columns, then openfda_dataframe_query for SQL. Absent when staging was not requested.",
"type": "boolean"
},
"staged_rows": {
"description": "Rows written to the canvas table. Compare with meta.total: a smaller value means staging stopped at its size budget and the table holds only the first staged_rows records.",
"type": "number"
},
"totalResults": {
"description": "Total matching recall/enforcement records in the dataset",
"type": "number"
},
"truncated": {
"description": "True when fewer rows reached the canvas than matched upstream — staging stopped at its size budget or openFDA's 25000-row pagination ceiling. Narrow the query (filters, date range) for a complete set.",
"type": "boolean"
}
},
"type": "object"
}
},
{
"description": "Search problem reports submitted to the FDA for tobacco products, including e-cigarettes, vaping products, cigarettes, and smokeless tobacco. Reports capture product type, reported health problems (e.g. seizure, chest pain), product problems (e.g. exploding battery), whether a non-user was affected, and submission date. Use to investigate safety signals, find reports by product type, or analyze health effects. With stage=true, call openfda_dataframe_describe for the staged columns, then openfda_dataframe_query for SQL.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"canvas_id": {
"description": "Canvas ID returned by a prior stage=true call to this tool or another openFDA search tool (openfda_search_* or openfda_lookup_ndc). Passing one stages this search onto that canvas (same effect as stage=true) so result sets accumulate for cross-table joins. Omit to stage onto a fresh canvas.",
"pattern": "^[A-Za-z0-9_-]{10}$",
"type": "string"
},
"limit": {
"default": 10,
"description": "Maximum number of records to return (1-1000, default 10). Serialized record size varies by three orders of magnitude across openFDA endpoints, so the page is also bounded by a 24000-byte serialized budget: a page that would overrun it returns fewer records than requested and reports the cut on page_omitted. Whenever any record matched, at least one comes back, however large it measures.",
"maximum": 1000,
"minimum": 1,
"type": "number"
},
"search": {
"description": "openFDA search query using field:value syntax. Examples: tobacco_products:\"Electronic cigarette\", reported_health_problems:\"Seizure\", nonuser_affected:\"Yes\". Omit to browse recent reports. Double quotes, parentheses, and range brackets must balance, and the query must not end on a backslash — each is rejected before the request.",
"minLength": 1,
"pattern": "\\S",
"type": "string"
},
"skip": {
"default": 0,
"description": "Number of records to skip for pagination (default 0). openFDA caps pagination at 25000 records; a higher value returns a pagination_limit_reached error.",
"minimum": 0,
"type": "number"
},
"sort": {
"description": "Sort expression — a field path optionally suffixed with :asc or :desc; comma-separate for multi-field sort. Example: date_submitted:desc. Field paths take only letters, digits, underscores, and dots; anything else is rejected before the request. A well-formed but non-sortable field still causes a query error — use a documented field name.",
"minLength": 1,
"pattern": "^ *[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*(?::[^,:]*)?(?: *, *[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*(?::[^,:]*)?)* *$",
"type": "string"
},
"stage": {
"default": false,
"description": "Stage the matched set on a DataCanvas for SQL analysis — openfda_dataframe_describe lists the staged columns, openfda_dataframe_query runs the SQL. Default false — the call returns one page for one upstream request. When true, records are also drained onto a canvas table up to a size budget (staged_rows reports how many reached it). Staging is for record-level SQL over a bounded slice; for a distribution over everything that matched, openfda_count_values aggregates server-side in one request. Requires CANVAS_PROVIDER_TYPE=duckdb.",
"type": "boolean"
}
},
"type": "object"
},
"name": "openfda_search_tobacco_reports",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"meta",
"results",
"totalResults"
]
},
{
"required": [
"error"
]
}
],
"properties": {
"canvas_id": {
"description": "DataCanvas session id for the staged result set. Present when this call staged. Pass to openfda_dataframe_query / openfda_dataframe_describe, or back into this tool to accumulate more tables on the same canvas.",
"type": "string"
},
"canvas_table": {
"description": "Canvas table holding the staged rows. Present when rows were staged; list its columns with openfda_dataframe_describe, then reference it in openfda_dataframe_query FROM clauses.",
"type": "string"
},
"effectiveQuery": {
"description": "Search filter applied to the query, as submitted to openFDA",
"type": "string"
},
"error": {
"additionalProperties": {},
"description": "Present when the call failed. Absent on success.",
"properties": {
"code": {
"description": "JSON-RPC error code for this failure.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"data": {
"additionalProperties": {},
"properties": {
"reason": {
"description": "Machine-readable failure mode. Declared by this tool: `canvas_disabled`: Staging was requested (stage=true or a canvas_id) but DataCanvas is disabled. `canvas_not_found`: The canvas_id is well-formed but names no active canvas — expired or never minted. `canvas_capacity_exhausted`: canvas_id was omitted and the active canvas cap is already reached. `rate_limited`: The openFDA daily or per-minute request limit is exceeded. `upstream_error`: The openFDA API returned a 5xx server error. `malformed_search`: The search query leaves a double quote, parenthesis, or range bracket unclosed, or ends on a backslash. `query_error`: The search query was rejected by openFDA (malformed field name, invalid syntax). `pagination_limit_reached`: skip exceeds the 25000 record pagination ceiling. Other values are possible when a failure originates below the handler.",
"examples": [
"canvas_disabled",
"canvas_not_found",
"canvas_capacity_exhausted",
"rate_limited",
"upstream_error",
"malformed_search",
"query_error",
"pagination_limit_reached"
],
"type": "string"
},
"recovery": {
"additionalProperties": {},
"description": "Actionable next step for the caller.",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"type": "object"
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"type": "object"
},
"message": {
"description": "Human-readable description of what went wrong.",
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"meta": {
"additionalProperties": false,
"description": "Response metadata",
"properties": {
"lastUpdated": {
"description": "Dataset last updated date",
"type": "string"
},
"limit": {
"description": "Page size applied to this request — the requested limit, lowered to the records returned when the 24000-byte inline budget bounded the page (see page_omitted). Not a count of what arrived: a window running past the end of the matched set returns fewer records than this, so read the length of results for the actual count.",
"type": "number"
},
"skip": {
"description": "Pagination offset",
"type": "number"
},
"total": {
"description": "Total matching records in the dataset",
"type": "number"
},
"totalUnverified": {
"description": "Present (true) only on an empty page at skip > 0 whose total could not be confirmed: openFDA answers a page past the end and a search that matched nothing alike, and the follow-up request for the total failed. total then reads 0 without ruling out records at a lower skip — re-call with skip=0 to tell.",
"type": "boolean"
}
},
"required": [
"total",
"skip",
"limit",
"lastUpdated"
],
"type": "object"
},
"notice": {
"description": "Canvas staging disclosure when the call staged, the byte-budget disclosure and the routes to the withheld records when the inline page was bounded, and guidance when results are empty or paging overshot — how to broaden filters or adjust the query.",
"type": "string"
},
"page_bytes": {
"description": "Serialized size of results in this response, in bytes. Present only when the 24000-byte inline budget bounded the page; larger than the budget only when a single record exceeds it on its own.",
"type": "number"
},
"page_omitted": {
"description": "Records dropped from the requested limit/skip window so the page fit the inline byte budget. Present only when the page was bounded. Read them by re-calling with skip advanced by the number of records returned, lower limit for a smaller page, or pass stage=true to query a bounded drain of the match with openfda_dataframe_query.",
"type": "number"
},
"results": {
"description": "Tobacco problem report records. Key fields: report_id, date_submitted, tobacco_products[] (product type description), reported_health_problems[] (health effects), reported_product_problems[] (device/product defects), number_tobacco_products, number_health_problems, number_product_problems, nonuser_affected.",
"items": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
"spilled": {
"description": "True when this call staged its matched set on the canvas — use canvas_id with openfda_dataframe_describe for its columns, then openfda_dataframe_query for SQL. Absent when staging was not requested.",
"type": "boolean"
},
"staged_rows": {
"description": "Rows written to the canvas table. Compare with meta.total: a smaller value means staging stopped at its size budget and the table holds only the first staged_rows records.",
"type": "number"
},
"totalResults": {
"description": "Total matching tobacco problem reports in the dataset",
"type": "number"
},
"truncated": {
"description": "True when fewer rows reached the canvas than matched upstream — staging stopped at its size budget or openFDA's 25000-row pagination ceiling. Narrow the query (filters, date range) for a complete set.",
"type": "boolean"
}
},
"type": "object"
}
}
]
}Verify it yourself
curl -s https://api.teppi.xyz/v1/evidence/sha256:03b4742d1350b02f9281306506e1611af925369ce6d8c6c7d164493e3ebadfc2 | sha256sum