Obtain the contractually agreed free-time periods for demurrage (at origin and destination terminals) and detention (container hold by shipper/consignee) from the carrier's tariff or service contract
Ingest container milestone events (gate-in, availability notification, gate-out, empty return) from the carrier or terminal API and record the timestamp for each event
Calculate elapsed free time by subtracting the event start timestamp (e.g., vessel arrival or container availability) from the current date, comparing against the agreed free-time days
Trigger alerts at 50%, 80%, and 100% of free-time consumption to allow the shipper or consignee time to arrange pickup or empty return
Capture incurred demurrage and detention charges from the carrier's invoice and reconcile against the calculated free-time usage to identify billing disputes
Known gotchas
Free-time counting rules vary by carrier: some count calendar days, others business days, and some exclude the first day of availability; the carrier tariff is the authoritative source
Demurrage and detention are distinct charges with separate free-time clocks; conflating them leads to incorrect accrual calculations and missed dispute windows
Container availability notifications from the terminal may arrive hours after physical availability; use the terminal's confirmed availability timestamp, not the notification receipt time, as the free-time start
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp