contingency_plan
Detects active disruptions on a freight lane and generates priced contingency options—alternate routes, modal shift, port swap—ranked by cost, time, or balanced urgency.
Instructions
'My route just broke — what do I do AHEAD of the next sailing?' Give a lane and it detects the ACTIVE disruption (Red-Sea/Bab-el-Mandeb, Panama Canal drought, port labour strike, typhoon/hurricane, peak congestion — reusing the disruption catalogue) and generates an ACTIONABLE response playbook: alternate ROUTING (Cape of Good Hope), MODAL-SHIFT (air/sea-air the urgent slice), PORT-SWAP (divert to the unaffected coast/gateway), PRE-POSITION (build buffer ahead of the window), RE-PRIORITISE — each PRICED against the lane's real freight & lead time: the modeled cost (USD) and time (days) of plan B versus HOLDING. It ranks the plays by your urgency (cost-first vs time-first) and recommends one. Pass disruption_type to model a specific what-if even if it isn't currently active. Honest (regla 7): MODELED, indicative response options & deltas — not a guarantee of alternate-routing space; validate availability with your carrier/forwarder. PREMIUM: pay per call with x402 (USDC on Base) or a prepaid key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| origin_port | Yes | Origin port (city name, UN/LOCODE, or 'City, Country'). | |
| dest_port | Yes | Destination port. | |
| container_type | No | Container '20ft'/'40ft'/'40HC'. Optional; default '40ft'. | |
| ship_date | No | Ship date (YYYY-MM-DD) — selects which seasonal/dated disruptions are active. Optional; default today. | |
| disruption_type | No | Force a specific disruption: 'red-sea' / 'panama' / 'labor' / 'weather' / 'peak' (else the most severe active one is chosen; an inactive type is modeled as a what-if). Optional. | |
| urgency | No | 'cost' (minimise spend), 'time' (minimise delay) or 'balanced'. Optional; default balanced. |