Msha Mines

v0.2.1
io.github.pipeworx-io/msha-mines Checked 2 days ago Published 1 month ago

MSHA mine records — search a US mine by operator or mine name, or look up a known MSHA Mine ID for…

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

msha_mine_detail

Look up a known MSHA Mine ID: current status, type, commodity, operator and controller, plus recent inspections, recent violations (with assessed penalties, S&S flag, and abatement/termination dates), and recent quarterly employment and coal production. Violations/inspections/production cover only the most recent 5 calendar years (the response says so) — MSHA's full history back to 2000 is not loaded. Sourced from MSHA's own bulk mine-records files (public domain), refreshed weekly. Keyless.

ParameterTypeDescription
mine_id *stringMSHA Mine ID, e.g. "4608254". Find it with msha_mine_search if you only have an operator/mine name.
inspections_limitnumberMax recent inspections to return (default 10, max 50).
violations_limitnumberMax recent violations to return (default 20, max 100).

msha_violation_counts

Count MSHA violations issued at one mine within a calendar year or year range — in ONE call, not a listing. Returns the TOTAL plus a breakdown by who it was issued to (Operator vs Contractor vs Agent vs Miner) and by significant-and-substantial (S&S) status. Use this instead of msha_mine_detail when the question is "how many" — msha_mine_detail only returns its most recent violations_limit rows (default 20, max 100) and has no true count. Counted by the calendar year of each violation's own issue date (VIOLATION_ISSUE_DT, via MSHA's own CAL_YR field). Only the most recent 5 calendar years…

ParameterTypeDescription
mine_idstringMSHA Mine ID, e.g. "4601437". Preferred over mine_name — unambiguous.
mine_namestringMine, operator, or controller name to resolve to a Mine ID — used only when mine_id is omitted, and only works if it matches exactly one mine.
yearnumberSingle calendar year to count, e.g. 2025.
year_fromnumberFirst calendar year of a range (inclusive). Use together with year_to instead of year.
year_tonumberLast calendar year of a range (inclusive). Use together with year_from instead of year.