Generate Montgomery Evidence File
montgomery_fileGenerate a timestamped Montgomery file — a carrier-selection evidence report — for a carrier by US DOT number.
Since Montgomery v. Caribe Transport II (SCOTUS, May 2026), freight brokers are exposed to state-law negligent-selection claims and need documented, timestamped, safety-data-based carrier selection. This report is that artifact: the two risk indices (inspection / compliance risk and crash risk, each with its components, percentiles, activity-band context and its own historical-validation line), the legacy composite (labelled backward-compatibility only), hard flags, FMCSA safety rating, and the methodology disclaimer, dated as of the scoring run. A booking agent should generate and retain this file at the moment a carrier is selected for a load.
Args:
dot_number: US DOT number, digits only
format: "text" (default; the filing-ready plain-text report, available on the free tier) or "json" (structured fields; requires an API key on the monitor or compliance tier)
Returns: format="text" gives the plain-text report (structured field report_text); format="json" gives structured fields { report, generated, dot_number, legal_name, dba_name, safety_rating, status_code, power_units, inspection_risk, crash_risk, legacy_composite (v0.5), carrier_score (backward-compatible), components, flags, data_sufficiency, score_version, scored_as_of, disclaimer } (v0.4 parquets return indices + composite instead). Every report embeds the disclaimer verbatim — keep it when storing or quoting the report.
Audit archive (paid tiers): every report generated with an API key is stored immutably server-side and the result carries audit_entry_id + sha256 (SHA-256 of the plain-text report). Quote both when citing the report; later, verify_evidence(entry_id) proves the archived copy is unchanged and audit_entries lists what was generated. Monitor keys can retrieve the last 90 days (2,000 reports/month); Compliance keys have unlimited retention and reports.
Errors: 403 if format=json without an API key; 404 unknown DOT; 429 if a Monitor key has used its 2,000 reports this month (upgrade hint in the message); 503 if scores are not computed yet.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | "text" = filing-ready report (free tier); "json" = structured fields (requires API key) | text |
| dot_number | Yes | US DOT number of the carrier, digits only (e.g. "1234567") |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flags | No | ||
| report | No | Report title line (format="json") | |
| sha256 | No | Paid tiers: SHA-256 of the archived plain-text report — cite it alongside the entry id | |
| indices | No | ||
| dba_name | No | ||
| composite | No | ||
| generated | No | Report generation date (YYYY-MM-DD) | |
| surcharge | No | ||
| base_score | No | ||
| components | No | ||
| crash_risk | No | v0.5: crash risk index with components and validation | |
| disclaimer | No | ||
| dot_number | No | ||
| legal_name | No | ||
| power_units | No | ||
| report_text | No | Filing-ready plain-text evidence report (format="text") | |
| status_code | No | ||
| sub_indices | No | ||
| scored_as_of | No | ||
| carrier_score | No | 0-100, higher = riskier (v0.5: == legacy_composite.score) | |
| safety_rating | No | ||
| score_version | No | ||
| audit_entry_id | No | Paid tiers: id of the immutable archived copy of this report (use with verify_evidence / audit_entries) | |
| inspection_risk | No | v0.5: inspection / compliance risk index with components and validation | |
| data_sufficiency | No | ||
| legacy_composite | No | v0.5: legacy composite, backward compatibility only | |
| methodology_note | No |