Skip to main content
Glama

get_osha_enforcement

Read-only

OSHA inspections from DOL, a row each; include_violations=true attaches its citations. insp_type: A Accident, B Complaint, C Referral, D Monitoring, E Variance, F FollowUp, G Unprog Rel, H Planned, I Prog Related, J Unprog Other, K Prog Other, L Other-L, M Fatality/Catastrophe, N Unprog Emph. Name/type/penalty filters search a 5,000-row window (coverage_warning). More: keyvex.com/docs/tools/get_osha_enforcement

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": "get_osha_enforcement"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoDefault 50.
sinceNoYYYY-MM-DD, inclusive, on open_date.
stateNo2-letter.
untilNoYYYY-MM-DD, inclusive, on open_date.
sort_byNoDefault open_date; case_mod_date refuses state, naics_code, since, until.
insp_typeNo
naics_codeNoExact, 2-6 digits.
sort_orderNoDefault desc.
activity_nrNo
min_penaltyNoMin violation penalty, dollars.
establishment_nameNoSubstring.
include_violationsNoDefault false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changed
    • removedInput schema / properties / activity_nr / description
      Removed value: -"Direct lookup by OSHA inspection activity number (e.g., '317465899'). Returns the inspection with its violations attached. Fastest path."
    • changedInput schema / properties / establishment_name / description
      Previous value: -"Case-insensitive substring against the inspected establishment's name (e.g., 'amazon', 'dollar general'). Client-side filter."New value: +"Substring."
    • changedInput schema / properties / include_violations / description
      Previous value: -"When true, attaches each returned inspection's violation citations under a `violations` array (standard, type, penalties, abatement/contest dates). Default false."New value: +"Default false."
    • removedInput schema / properties / insp_type / description
      Removed value: -"One-letter inspection-type code (e.g., 'M' Fat/Cat, 'B' Complaint, 'H' Planned — full legend in the tool description)."
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum inspections to return. Default 50, max 500."New value: +"Default 50."
    • changedInput schema / properties / min_penalty / description
      Previous value: -"Keep only inspections with at least one violation whose initial or current penalty is >= this amount (dollars). Implies include_violations=true."New value: +"Min violation penalty, dollars."
    • changedInput schema / properties / naics_code / description
      Previous value: -"Exact NAICS industry code of the inspected site (e.g., '238160' roofing contractors). Note: '000000' on many pre-NAICS-era records."New value: +"Exact, 2-6 digits."
    • changedInput schema / properties / since / description
      Previous value: -"Inspection open_date lower bound (YYYY-MM-DD inclusive)."New value: +"YYYY-MM-DD, inclusive, on open_date."
    • changedInput schema / properties / sort_by / description
      Previous value: -"Sort key. Default: open_date. case_mod_date = most recently UPDATED cases (cannot combine with state/naics_code/since/until)."New value: +"Default open_date; case_mod_date refuses state, naics_code, since, until."
    • changedInput schema / properties / sort_order / description
      Previous value: -"Default: desc (most recent first)."New value: +"Default desc."
    • changedInput schema / properties / state / description
      Previous value: -"Two-letter site state (e.g., 'TX', 'CA')."New value: +"2-letter."
    • changedInput schema / properties / until / description
      Previous value: -"Inspection open_date upper bound (YYYY-MM-DD inclusive)."New value: +"YYYY-MM-DD, inclusive, on open_date."
  2. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/openWorldHint/non-destructive, so the safety profile is covered. The description adds genuinely non-obvious behavior: one row per inspection, citations attached only on request, and — most importantly — that name/type/penalty filters search only a 5,000-row window and emit a coverage_warning. It still says nothing about result fields or how to page past the window.

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?

Front-loaded with purpose and the key flag, then the code table, then the coverage caveat. Very dense but telegraphic; the insp_type enumeration consumes a large share of the text and the trailing docs URL adds little for an agent that already has the schema.

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

Completeness3/5

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

For a 12-parameter, no-output-schema tool, the description covers the tricky parts (type codes, coverage window, sort restriction) but leaves the return shape entirely unstated and gives no way to page beyond limit's 500 maximum or the 5,000-row filter window.

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

Parameters4/5

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

Schema coverage is 83%, so the baseline is 3, but the description earns more by decoding the otherwise undocumented insp_type letters (A–N) and explaining the interaction between filters and the row window. It also restates the sort_by incompatibility with state/naics_code/since/until, which the schema already notes.

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

Purpose4/5

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

States a specific verb and resource: 'OSHA inspections from DOL, a row each', plus the optional citation attachment. The domain (OSHA/DOL inspections) is distinctive enough to separate it from siblings like get_epa_enforcement or get_enforcement_actions, though no sibling is named explicitly.

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

Usage Guidelines3/5

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

Usage context is implied rather than stated: it is the tool for OSHA inspection records, and include_violations=true is the switch for citations. There is no explicit when-to-use/when-not guidance and no mention of what to use instead for other enforcement data or for paging beyond the 5,000-row window.

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.

Resources