Skip to main content
Glama

Recall Spend Window

recall_spend_window
Read-onlyIdempotent

Given an FDA-assigned recall_number, returns recall metadata plus Medicare Part D and Medicaid SDUD federal spend on the recalled drug during the recall window (initiation -> termination), summed SERVER-SIDE with per-year Part D rows and per-NDC Medicaid rows riding the answer. The recall source carries NO NDC (openfda_product_ndc_first is NULL on all 17,830 current rows), so the Medicaid leg reaches NDCs through dim_drug on the openFDA product name and says so. Each leg reports its own published-year coverage, so 'no spend', 'not published yet' and 'no join key' are three different answers instead of one null.

Medicaid totals EXCLUDE the SDUD national roll-up, which CMS publishes under state 'XX' beside the 50 state rows and which would otherwise roughly double every Medicaid figure.

Reference demo: recall_number D-1489-2019 (Fresenius Kabi fluorouracil, Class I, window 2019-2022) exercises both legs and the NDC bridge. This description quotes NO dollar figure on purpose: the answer is the only place a number lives, so a change to the computation can never leave a stale figure in the documentation. It did once -- the demo totals here were the pre-2026-08-10 national-roll-up double count and stood six weeks after the fix.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
detail_limitNo
recall_numberYes
acknowledge_era_breakNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitNo
as_ofNo
valueYes
sourceYes
statusNocomplete
caveatsNo
failureNo
qualityNo
refusalNo
vintageNoas_restated
audit_idYesUUID; ties to medicare_silver.audit_log row.
signatureNo
tenant_idNoCalling tenant slug, resolved by the binding and stamped via the per-call tenant context. Defaults to the bootstrap 'internal' tenant for local/in-process callers.
timestampYes
confidenceNo
data_as_ofNo
request_idYes
methodologyNo
snapshot_setYes{table_fqn → iceberg_snapshot_id (int64)}. Per M-2 §2.2.
tool_versionYes
response_hashYesSHA-256 of canonicalized form per M-2 §2.4.
result_statusYes
vintage_basisNodefault_unmeasured
as_of_assertedNo
as_of_observedNo
parse_revisionNo
as_of_effectiveNo
freshness_stateNounknown
methodology_eraNo
confidence_basisNo
semantic_versionYes
invariants_appliedNo
finality_confidenceNo
cms_vintage_sequenceYes
parser_artifact_hashYes
methodology_blend_factorsNo
parser_artifact_hash_basisNonot_evaluated

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources