# Logistics Detention Cost Calculator AI Agent Connect

> Logistics Detention Cost Calculator MCP automates the math behind equipment detention fees. It connects your AI client to carrier tariff catalogs and shipment registries to determine exactly how much is owed based on free time, daily rates, and regional holiday exceptions.

## Overview
- **Category:** finance
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_vlqoHADOR959fI4BycUGSkW9JOsv1XR1lQ6pN3sm/ai-agent-connect
- **Tags:** detention, carrier, tariff, shipment, logistics-automation

## Description

Calculating detention fees is usually a headache of cross-referencing shipment dates against carrier tariff sheets. This MCP changes that by giving your AI agent direct access to the data it needs to settle disputes and verify invoices. Instead of manually checking how many days of free time a specific carrier allows for a 40ft container, you just ask your agent. It pulls the specific tariff details, checks the shipment status, and accounts for regional holidays to ensure you aren't paying for days that shouldn't count. You can use it to audit carrier invoices, verify shipment identifiers, or quickly run the numbers on a pending penalty. It turns a multi-step manual process into a single prompt.

## Tools

### calculate_detention_costs
This tool calculates the total detention penalty. It provides a full breakdown of the chargeable duration and how daily rates were applied.

### get_holiday_calendar
This tool provides a list of recognized holiday dates for a specific region. It helps your agent identify exception days that shouldn't trigger penalties.

### get_tariff_details
This tool retrieves specific free time allowances and daily rates for a given carrier and equipment type.

### validate_shipment_identifiers
This tool verifies that the shipment and carrier identifiers you provide are valid and currently active.

## Prompt Examples

**Prompt:** 
```
Calculate the detention cost for shipment SHP-123 using a 40ft_hc container from carrier CARRIER-X. It was released on 2024-05-01 and returned on 2024-05-10.
```

**Response:** 
```
The total detention amount for shipment SHP-123 is $450.00, based on 5 chargeable days at a daily rate of $90.00.
```

**Prompt:** 
```
What are the tariff details for a 20ft_container with carrier LOGI-CORP?
```

**Response:** 
```
For carrier LOGI-CORP and a 20ft_container, the free time is 3 days and the daily rate is $50.00 USD.
```

**Prompt:** 
```
Is shipment ID SHIP-999 valid for carrier SEA-LINE?
```

**Response:** 
```
Yes, shipment SHIP-999 is valid and currently has an active status with SEA-LINE.
```

## Capabilities

### Automated Penalty Math
Your agent uses this to calculate total costs based on duration and daily rates.

### Tariff Lookup
The agent checks specific carrier rules for free time and equipment types.

### Holiday Exception Handling
Your agent pulls regional calendars to skip holiday dates in cost calculations.

### Shipment Verification
The agent validates that shipment IDs and carrier info are active before running math.

## Use Cases

### Invoice Auditing
Compare a carrier's detention charge against the calculated amount from the MCP to find overcharges.

### Dispute Resolution
Use the detailed cost breakdown to provide evidence when contesting a penalty with a carrier.

### Cost Forecasting
Run quick calculations on delayed shipments to estimate upcoming detention expenses.

### Data Validation
Confirm shipment and carrier identifiers are correct before attempting to process logistics data.

## Benefits

- Eliminates manual lookups in carrier tariff catalogs.
- Reduces errors by automatically accounting for regional holidays.
- Speeds up shipment auditing with instant cost breakdowns.
- Connects directly to shipment registries for real-time validation.

## How It Works

You connect the MCP to your AI client and start asking questions about shipments and tariffs.

1. Connect your preferred MCP-compatible client to Vinkius.
2. Provide the shipment ID and carrier details to your agent.
3. The agent uses the MCP to pull tariff rates and validate the shipment.
4. The agent calculates the final cost, including holiday exceptions.
5. You receive a detailed breakdown of the detention penalty.

## Frequently Asked Questions

**How does this MCP handle carrier-specific rules?**
The MCP uses the get_tariff_details tool to pull the exact free time and daily rates assigned to a specific carrier and equipment type.

**Can it account for weekends or holidays?**
Yes. The agent uses the get_holiday_calendar tool to identify regional holiday dates and treat them as exceptions in the calculation.

**What information do I need to provide to calculate a cost?**
You typically need the shipment ID, the carrier name, the equipment type, the release date, and the return date.

**Does it work with any AI client?**
It works with any MCP-compatible client like Claude, Cursor, or Windsurf.

**How do I know if a shipment ID is correct?**
The validate_shipment_identifiers tool checks if the provided shipment and carrier IDs are valid and active.

**How are detention costs calculated?**
Costs are calculated by determining the total duration between equipment release and return, subtracting the free time defined in the carrier's tariff, and multiplying the remaining chargeable days by the daily rate. You can use `calculate_detention_costs` to perform this calculation automatically.

**Can I exclude weekends and holidays from the calculation?**
Yes. When using `calculate_detention_costs`, you can set the `isHolidayExempt` parameter to true to exclude weekends and holidays from the chargeable duration.

**How do I check the specific rates for a carrier?**
You can use the `get_tariff_details` tool by providing the carrier code and the equipment type to retrieve the applicable free time and daily rates.
