Skip to main content
Glama

RegDataLab – FDA Compliance Data

Inspection outcome statistics

fda_inspection_stats
Read-onlyIdempotent

Count FDA inspections by fiscal year and outcome (OAI, VAI, NAI), with each year's OAI share, from the FDA Data Dashboard inspection dataset. With no filters the counts match https://www.regdatalab.com/stats/inspections. FDA's fiscal year N runs from Oct 1 of year N-1 to Sep 30 of year N; the current fiscal year is year to date. OAI means Official Action Indicated: regulatory and/or administrative actions are recommended. VAI means Voluntary Action Indicated: objectionable conditions were found but no action is recommended. NAI means No Action Indicated. These are counts of recorded inspections, not a measure of current site safety. For the inspections themselves use fda_inspections.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "fda_inspection_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
countryNoCountry code (e.g. US, IN, CN)
product_typeNoProduct type, partial match (e.g. Drugs, Devices, Food/Cosmetics, Biologics)
project_areaNoProject area, partial match (e.g. Drug Quality Assurance, Bioresearch Monitoring)
fiscal_year_toNoLast fiscal year to include
fiscal_year_fromNoFirst fiscal year to include

Output Schema

NameRequiredDescriptionDefault
dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / data / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": {},
      -    "description": "FDA inspection counts by fiscal year and outcome (OAI, VAI, NAI) with the OAI share",
      -    "properties": {
      -      "by_fiscal_year": {
      -        "description": "Newest fiscal year first",
      -        "items": {
      -          "additionalProperties": {},
      -          "properties": {
      -            "fiscal_year": {
      -              "type": "number"
      -            },
      -            "nai": {
      -              "type": "number"
      -            },
      -            "oai": {
      -              "type": "number"
      -            },
      -            "oai_share_pct": {
      -              "anyOf": [
      -                {
      -                  "type": "number"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "description": "OAI as a percent of total, one decimal"
      -            },
      -            "total": {
      -              "description": "All inspections in the year, classified or not",
      -              "type": "number"
      -            },
      -            "unclassified": {
      -              "type": "number"
      -            },
      -            "vai": {
      -              "type": "number"
      -            },
      -            "year_to_date": {
      -              "description": "True for the fiscal year in progress",
      -              "type": "boolean"
      -            }
      -          },
      -          "required": [
      -            "fiscal_year",
      -            "total",
      -            "oai",
      -            "vai",
      -            "nai",
      -            "oai_share_pct"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "coverage_note": {
      -        "description": "What was searched; when nothing matched, says no matching records does not establish safety",
      -        "type": "string"
      -      },
      -      "current_fiscal_year": {
      -        "type": "number"
      -      },
      -      "data_freshness": {
      -        "additionalProperties": {
      -          "additionalProperties": {},
      -          "properties": {
      -            "as_of_date": {
      -              "type": "string"
      -            },
      -            "executed_at": {
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "executed_at",
      -            "as_of_date"
      -          ],
      -          "type": "object"
      -        },
      -        "description": "Last successful import per dataset; state it in answers",
      -        "propertyNames": {
      -          "type": "string"
      -        },
      -        "type": "object"
      -      },
      -      "filters": {
      -        "additionalProperties": {},
      -        "properties": {},
      -        "type": "object"
      -      },
      -      "method_note": {
      -        "type": "string"
      -      },
      -      "next_step": {
      -        "description": "Present when nothing matched: how to widen the search",
      -        "type": "string"
      -      },
      -      "notices": {
      -        "description": "Account notices about this key, such as a low balance; show them to the user",
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "see_also": {
      -        "additionalProperties": {
      -          "type": "string"
      -        },
      -        "description": "Related tools and what each adds",
      -        "propertyNames": {
      -          "type": "string"
      -        },
      -        "type": "object"
      -      },
      -      "sources": {
      -        "description": "fda.gov pages behind this result (letters, 483s, import alerts, firm profiles, FDA search pages), documents first; cite these links in the answer",
      -        "items": {
      -          "additionalProperties": {},
      -          "properties": {
      -            "title": {
      -              "type": "string"
      -            },
      -            "url": {
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "title",
      -            "url"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "stats_page_url": {
      -        "type": "string"
      -      },
      -      "totals": {
      -        "additionalProperties": {},
      -        "properties": {
      -          "nai": {
      -            "type": "number"
      -          },
      -          "oai": {
      -            "type": "number"
      -          },
      -          "oai_share_pct": {
      -            "anyOf": [
      -              {
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "description": "OAI as a percent of total, one decimal"
      -          },
      -          "total": {
      -            "description": "All inspections in the year, classified or not",
      -            "type": "number"
      -          },
      -          "unclassified": {
      -            "type": "number"
      -          },
      -          "vai": {
      -            "type": "number"
      -          }
      -        },
      -        "required": [
      -          "total",
      -          "oai",
      -          "vai",
      -          "nai",
      -          "oai_share_pct"
      -        ],
      -        "type": "object"
      -      }
      -    },
      -    "required": [
      -      "current_fiscal_year",
      -      "by_fiscal_year",
      -      "totals",
      -      "see_also",
      -      "data_freshness",
      -      "coverage_note"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": {},
      -    "description": "Returned instead of records when the session has no API key: how to sign up and connect",
      -    "properties": {
      -      "attempted_tool": {
      -        "type": "string"
      -      },
      -      "auth_required": {
      -        "const": true,
      -        "type": "boolean"
      -      },
      -      "message": {
      -        "type": "string"
      -      },
      -      "signup_url": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "auth_required",
      -      "attempted_tool",
      -      "message",
      -      "signup_url"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": {},
      +    "description": "FDA inspection counts by fiscal year and outcome (OAI, VAI, NAI) with the OAI share",
      +    "properties": {
      +      "by_fiscal_year": {
      +        "description": "Newest fiscal year first",
      +        "items": {
      +          "additionalProperties": {},
      +          "properties": {
      +            "fiscal_year": {
      +              "type": "number"
      +            },
      +            "nai": {
      +              "type": "number"
      +            },
      +            "oai": {
      +              "type": "number"
      +            },
      +            "oai_share_pct": {
      +              "description": "OAI as a percent of total, one decimal",
      +              "type": [
      +                "number",
      +                "null"
      +              ]
      +            },
      +            "total": {
      +              "description": "All inspections in the year, classified or not",
      +              "type": "number"
      +            },
      +            "unclassified": {
      +              "type": "number"
      +            },
      +            "vai": {
      +              "type": "number"
      +            },
      +            "year_to_date": {
      +              "description": "True for the fiscal year in progress",
      +              "type": "boolean"
      +            }
      +          },
      +          "required": [
      +            "fiscal_year",
      +            "total",
      +            "oai",
      +            "vai",
      +            "nai",
      +            "oai_share_pct"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "coverage_note": {
      +        "description": "What was searched; when nothing matched, says no matching records does not establish safety",
      +        "type": "string"
      +      },
      +      "current_fiscal_year": {
      +        "type": "number"
      +      },
      +      "data_freshness": {
      +        "additionalProperties": {
      +          "additionalProperties": {},
      +          "properties": {
      +            "as_of_date": {
      +              "type": "string"
      +            },
      +            "executed_at": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "executed_at",
      +            "as_of_date"
      +          ],
      +          "type": "object"
      +        },
      +        "description": "Last successful import per dataset; state it in answers",
      +        "propertyNames": {
      +          "type": "string"
      +        },
      +        "type": "object"
      +      },
      +      "filters": {
      +        "additionalProperties": {},
      +        "properties": {},
      +        "type": "object"
      +      },
      +      "method_note": {
      +        "type": "string"
      +      },
      +      "next_step": {
      +        "description": "Present when nothing matched: how to widen the search",
      +        "type": "string"
      +      },
      +      "notices": {
      +        "description": "Account notices about this key, such as a low balance; show them to the user",
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "see_also": {
      +        "additionalProperties": {
      +          "type": "string"
      +        },
      +        "description": "Related tools and what each adds",
      +        "propertyNames": {
      +          "type": "string"
      +        },
      +        "type": "object"
      +      },
      +      "sources": {
      +        "description": "fda.gov pages behind this result (letters, 483s, import alerts, firm profiles, FDA search pages), documents first; cite these links in the answer",
      +        "items": {
      +          "additionalProperties": {},
      +          "properties": {
      +            "title": {
      +              "type": "string"
      +            },
      +            "url": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "title",
      +            "url"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "stats_page_url": {
      +        "type": "string"
      +      },
      +      "totals": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "nai": {
      +            "type": "number"
      +          },
      +          "oai": {
      +            "type": "number"
      +          },
      +          "oai_share_pct": {
      +            "description": "OAI as a percent of total, one decimal",
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "total": {
      +            "description": "All inspections in the year, classified or not",
      +            "type": "number"
      +          },
      +          "unclassified": {
      +            "type": "number"
      +          },
      +          "vai": {
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "total",
      +          "oai",
      +          "vai",
      +          "nai",
      +          "oai_share_pct"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "current_fiscal_year",
      +      "by_fiscal_year",
      +      "totals",
      +      "see_also",
      +      "data_freshness",
      +      "coverage_note"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": {},
      +    "description": "Returned instead of records when the session has no API key: how to sign up and connect",
      +    "properties": {
      +      "attempted_tool": {
      +        "type": "string"
      +      },
      +      "auth_required": {
      +        "const": true,
      +        "type": "boolean"
      +      },
      +      "message": {
      +        "type": "string"
      +      },
      +      "signup_url": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "auth_required",
      +      "attempted_tool",
      +      "message",
      +      "signup_url"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, open-world, non-destructive behavior, yet the description adds real value: no-filter defaults, the fiscal-year boundary definition, current-year-is-YTD behavior, and a caveat that counts reflect recorded inspections rather than current site safety. It stops short of covering aggregation limits or how filters interact with the counts.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and scope are front-loaded, followed by the fiscal-year rule, acronym definitions, and the sibling pointer. The acronym definitions consume several sentences, but they are needed to interpret the returned outcome categories rather than being filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given full schema coverage, an output schema, and rich annotations, the description supplies the remaining interpretive context an agent needs: default output, fiscal-year boundaries, category meanings, and an alternative for raw records. Only the effect of filters on the returned counts is left implicit.

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

Parameters3/5

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

Schema coverage is 100% and every parameter carries an example (country codes, product type, project area, fiscal year bounds), so the schema does the heavy lifting. The description explains the fiscal-year semantics behind the two year parameters but adds nothing about country, product_type, or project_area matching behavior.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Count FDA inspections') plus the grouping dimensions (fiscal year and OAI/VAI/NAI outcome) and the source dataset. It also explicitly distinguishes itself from fda_inspections, which handles individual inspection records.

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

Usage Guidelines4/5

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

Explicitly routes the agent to fda_inspections when individual inspections are wanted, and states the default behavior with no filters (counts matching the referenced stats page). It does not address the other sibling, fda_inspection_observation_summary, so the alternative coverage is clear but not exhaustive.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.