# Logistics Container Dwell Calculator AI Agent Connect

> Logistics Container Dwell Calculator MCP gives your AI agent the ability to track container movements through every stage of the supply chain. It calculates exactly how much free time you have left, identifies when you've hit chargeable periods, and estimates the specific costs for demurrage and detention based on your terminal and carrier data.

## Overview
- **Category:** supply-chain
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_6ekuUU7hNa2zxCrWzltz7lvUp2NDIoZRuYBBLwBk/ai-agent-connect
- **Tags:** container, dwell-time, demurrage, detention, logistics-management

## Description

You can stop manually calculating container timelines and fee risks. This MCP lets your AI client handle the math for container lifecycles, from discharge at the terminal to final gate-out. Instead of digging through spreadsheets to see if you've exceeded your free time, you can just give your agent the timestamps and let it do the heavy lifting. It breaks down the time spent at each milestone, so you can see exactly where delays are happening. You can also use it to verify that your data is clean by checking if your event sequences make sense chronologically. It's a direct way to turn raw logistics timestamps into actionable cost estimates and efficiency reports.

## Tools

### analyze_free_time_efficiency
This tool evaluates how well a logistics provider is using their allotted free-time. It helps you see if you're pushing the limits of your carrier agreements.

### calculate_container_dwell
This tool provides a full breakdown of dwell times and costs for a single container. It calculates usage against free-time and estimates potential fees.

### get_stage_breakdown
This tool gives you a detailed view of the time elapsed between specific milestones. Use it to find bottlenecks in the container lifecycle.

### validate_event_sequence
This tool checks that your provided timestamps follow a logical chronological order. It ensures your data is valid before you run calculations.

## Prompt Examples

**Prompt:** 
```
Calculate the dwell for a container discharged on 2024-05-01, released by customs on 2024-05-03, picked up on 2024-05-05, and gated out on 2024-05-10, with 5 days of free-time, a $100 demurrage rate, and a $50 detention rate at Port Terminal A.
```

**Response:** 
```
The container has a total terminal dwell of 9 days. With 5 days of free-time, there are 4 chargeable days. The estimated cost is $400.
```

**Prompt:** 
```
Is my container lifecycle complete if I only have the discharge and customs release timestamps?
```

**Response:** 
```
No, the lifecycle is considered incomplete because the gate-out event has not yet occurred.
```

**Prompt:** 
```
Evaluate the efficiency of a container that stayed in the system for 12 days with 10 days of allowed free-time.
```

**Response:** 
```
The utilization ratio is 1.2, which indicates the container has entered the chargeable period and is at risk.
```

## Capabilities

### Cost Estimation
Your agent calculates potential demurrage and detention fees based on specific rates.

### Timeline Analysis
The AI breaks down the time elapsed between different container milestones.

### Efficiency Auditing
Your agent compares actual dwell time against allotted free-time to find utilization ratios.

### Data Validation
The tool checks that your timestamp sequences are chronologically correct.

### Bottleneck Identification
Your agent uses stage breakdowns to pinpoint where containers are sitting too long.

## Use Cases

### Demurrage Risk Assessment
Your agent monitors container dwell times to predict when fees will start accruing.

### Carrier Performance Review
Use the efficiency tool to see how well your team is utilizing allotted free-time.

### Data Integrity Checks
Run timestamp sequences through the validation tool to catch out-of-order events.

### Operational Bottleneck Analysis
Analyze stage breakdowns to see if containers are stuck at customs or terminal gates.

## Benefits

- Converts raw timestamps into specific dollar amounts for demurrage and detention.
- Identifies when containers have entered chargeable periods via utilization ratios.
- Detects errors in logistics data by validating chronological event sequences.
- Provides granular visibility into time spent at each stage of the container lifecycle.

## How It Works

Connecting this MCP to your AI client gives your agent immediate access to logistics math tools.

1. Connect your AI client to the Vinkius-hosted MCP.
2. Provide your container timestamps and free-time limits to your agent.
3. The agent calls the necessary tools to process the data.
4. You receive a detailed breakdown of dwell times, efficiency, or costs.

## Frequently Asked Questions

**What can this MCP calculate?**
It calculates container dwell times, free-time utilization, and estimated demurrage and detention costs.

**How does it handle demurrage and detention?**
You provide the specific rates and free-time limits, and the tool calculates the chargeable days and total cost.

**Can I use this with Claude or Cursor?**
Yes, you can connect this MCP to any MCP-compatible client like Claude, Cursor, or Windsurf.

**Does it check if my data is correct?**
Yes, the validate_event_sequence tool checks that your timestamps follow a logical chronological order.

**What is a utilization ratio?**
It is a value used to show how much of your free-time you have used. A ratio above 1.0 means you have exceeded your free-time and are in a chargeable period.

**What is included in the dwell calculation?**
The calculation includes terminal dwell, carrier dwell, free-time utilization, chargeable days, and estimated demurrage and detention costs.

**How can I check if my container events are in the correct order?**
You can use the `validate_event_sequence` tool to verify that your timestamps follow the logical order: Discharge, Customs Release, Pickup, and Gate-out.

**Does this tool calculate demurrage and detention?**
Yes, by providing the daily rates for demurrage and detention, the `calculate_container_dwell` tool will estimate the total costs incurred after free-time expires.
