Forge Tools openfda_recalls

openfda_recalls read

scidex.forge.openfda_recalls

Look up FDA enforcement actions and product recalls from the OpenFDA enforcement/recall database. Covers drug enforcement (voluntary/mandatory recalls, market withdrawals) and device recalls, classified by hazard severity (Class I/II/III). Distinct from scidex.forge.openfda_adverse_events (FAERS voluntary adverse event reports): this verb covers formal FDA enforcement actions. Use for pharmacovigilance, regulatory compliance, competitive intelligence, and safety signal investigation. Drug enforcement REST API: https://api.fda.gov/drug/enforcement.json — public, no auth. Device recall REST API: https://api.fda.gov/device/recall.json — public, no auth.

HTTP: POST /api/scidex/forge/openfda_recalls

Invoke

Calls scidex.tool.invoke on the substrate with this tool name. Edit the JSON below — it must match the input schema. The substrate runs the tool, records the call in substrate_tool_calls, and returns a structured envelope.

Sign in to invoke this tool. Schema and curl snippet are visible to anyone.

Schemas

Input schema
{
  "additionalProperties": false,
  "description": "Input schema for ``scidex.forge.openfda_recalls``.",
  "properties": {
    "query": {
      "description": "Search term for the recall lookup. Matched against product descriptions, recalling firm names, and reason_for_recall text. Examples: ``'aspirin'``, ``'pacemaker'``, ``'Abbott'``.",
      "title": "Query",
      "type": "string"
    },
    "product_type": {
      "default": "drug",
      "description": "FDA product category to query. ``'drug'`` → drug/enforcement endpoint; ``'device'`` → device/recall endpoint; ``'food'`` → food/enforcement endpoint.",
      "enum": [
        "drug",
        "device",
        "food"
      ],
      "title": "Product Type",
      "type": "string"
    },
    "classification": {
      "default": "",
      "description": "Optional hazard classification filter. Class I = most severe (serious health consequences or death); Class II = may cause temporary adverse effects; Class III = unlikely to cause adverse effects. Empty string returns all classifications.",
      "enum": [
        "",
        "Class I",
        "Class II",
        "Class III"
      ],
      "title": "Classification",
      "type": "string"
    },
    "limit": {
      "default": 20,
      "description": "Maximum number of recall records to return (default 20, max 100).",
      "maximum": 100,
      "minimum": 1,
      "title": "Limit",
      "type": "integer"
    }
  },
  "required": [
    "query"
  ],
  "title": "ForgeOpenfdaRecallsIn",
  "type": "object"
}
Output schema
{
  "$defs": {
    "FdaRecall": {
      "description": "One FDA enforcement/recall record.",
      "properties": {
        "recall_number": {
          "description": "FDA recall identifier.",
          "title": "Recall Number",
          "type": "string"
        },
        "recall_initiation_date": {
          "description": "Date the recall action was initiated (YYYYMMDD format from OpenFDA).",
          "title": "Recall Initiation Date",
          "type": "string"
        },
        "recalling_firm": {
          "description": "Name of the company initiating the recall.",
          "title": "Recalling Firm",
          "type": "string"
        },
        "product_description": {
          "description": "Description of the recalled product.",
          "title": "Product Description",
          "type": "string"
        },
        "reason_for_recall": {
          "description": "Reason stated by the recalling firm or FDA.",
          "title": "Reason For Recall",
          "type": "string"
        },
        "classification": {
          "description": "Hazard classification: 'Class I', 'Class II', or 'Class III'.",
          "title": "Classification",
          "type": "string"
        },
        "status": {
          "description": "Current recall status (e.g. 'Ongoing', 'Terminated').",
          "title": "Status",
          "type": "string"
        },
        "voluntary_mandated": {
          "description": "Whether the recall was 'Voluntary: Firm Initiated' or 'FDA Mandated'.",
          "title": "Voluntary Mandated",
          "type": "string"
        },
        "distribution_pattern": {
          "description": "Geographic or channel scope of the product distribution.",
          "title": "Distribution Pattern",
          "type": "string"
        }
      },
      "required": [
        "recall_number",
        "recall_initiation_date",
        "recalling_firm",
        "product_description",
        "reason_for_recall",
        "classification",
        "status",
        "voluntary_mandated",
        "distribution_pattern"
      ],
      "title": "FdaRecall",
      "type": "object"
    }
  },
  "description": "Response shape for ``scidex.forge.openfda_recalls``.",
  "properties": {
    "query": {
      "description": "The search query as submitted.",
      "title": "Query",
      "type": "string"
    },
    "product_type": {
      "description": "The FDA product category queried.",
      "title": "Product Type",
      "type": "string"
    },
    "classification_filter": {
      "description": "The classification filter applied (empty string = no filter).",
      "title": "Classification Filter",
      "type": "string"
    },
    "recalls": {
      "description": "Recall records matching the query, ordered as returned by OpenFDA.",
      "items": {
        "$ref": "#/$defs/FdaRecall"
      },
      "title": "Recalls",
      "type": "array"
    },
    "total_count": {
      "description": "Total number of matching records in OpenFDA (may exceed len(recalls)).",
      "title": "Total Count",
      "type": "integer"
    },
    "not_found": {
      "default": false,
      "description": "True when no recall records exist for the queried term.",
      "title": "Not Found",
      "type": "boolean"
    },
    "took_ms": {
      "description": "Wall-clock time for the upstream API call.",
      "title": "Took Ms",
      "type": "integer"
    }
  },
  "required": [
    "query",
    "product_type",
    "classification_filter",
    "total_count",
    "took_ms"
  ],
  "title": "ForgeOpenfdaRecallsOut",
  "type": "object"
}

curl snippet

Replace $SCIDEX_JWT with a valid bearer token. Read verbs are usually accessible without auth in dev; production requires a JWT.

curl -sS -X POST '/api/scidex/forge/openfda_recalls' \
  -H 'authorization: Bearer $SCIDEX_JWT' \
  -H 'content-type: application/json' \
  -d '{
  "query": ""
}'

Discussion

Posting anonymously. Sign in for attribution.

No comments yet — be the first.