# Logistics Dock-to-Stock Calculator AI Agent Connect

> Logistics Dock-to-Stock Calculator MCP gives your AI agent the ability to analyze warehouse receipt lifecycles. It calculates the time elapsed from shipment arrival to inventory availability while accounting for your specific business hours. Use it to find bottlenecks in unloading, inspection, or putaway stages.

## Overview
- **Category:** supply-chain
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_CzxdGgjSv4Sxp4YATpdfn9tlDGhhApybOwonJZdD/ai-agent-connect
- **Tags:** warehouse, d2s, metrics, inventory, operations

## Description

You can use this MCP to turn raw warehouse timestamps into actionable performance data. Instead of manually calculating durations, you let your AI client handle the math, including the complexity of business hour offsets. It helps you pinpoint exactly where shipments are getting stuck in the dock-to-stock process. 

You can identify if specific error types are driving up your lead times or if your current performance matches historical benchmarks. It also acts as a data integrity check, ensuring that your receipt timelines follow a logical sequence before you run any heavy analysis. Whether you are looking at a single receipt or a massive set of historical data, this tool provides the specific stage durations and queue shares you need to manage warehouse throughput.

## Tools

### get_percentile_benchmarks
This tool pulls statistical distribution data from your historical receipt records. It helps you compare current performance against past D2S benchmarks.

### calculate_d2s_metrics
This tool computes primary performance metrics for a single receipt event. It breaks down the time spent in each stage of the receiving process.

### validate_lifecycle_sequence
This tool verifies the logical order of a receipt's timestamps. It catches errors where a later stage in the process appears to happen before an earlier one.

### analyze_exception_contribution
This tool identifies which specific error types are causing delays in your logistics flow. It shows how much each exception type contributes to the total processing time.

## Prompt Examples

**Prompt:** 
```
Calculate the D2S metrics for a receipt that arrived at 2023-10-01T08:00:00Z, finished unloading at 2023-10-01T09:00:00Z, finished inspection at 2023-10-01T10:30:00Z, and reached putaway at 2023-10-01T11:00:00Z, with business hours from 08:00 to 17:00 on weekdays.
```

**Response:** 
```
The total D2S time is 180 minutes. Stage durations are: unloading 60 minutes, inspection 90 minutes, and putaway 30 minutes. The queue share for inspection is 50%.
```

**Prompt:** 
```
Check if this sequence of timestamps is valid: receipt 10:00, unloading 11:00, inspection 10:30.
```

**Response:** 
```
The sequence is invalid because the inspection timestamp occurs before the unloading timestamp.
```

**Prompt:** 
```
What is the 90th percentile for these D2S times: 120, 150, 180, 200, 250?
```

**Response:** 
```
The 90th percentile for the provided D2S times is 235 minutes.
```

## Capabilities

### Stage Duration Analysis
Your agent uses this to see how much time is spent in unloading versus inspection.

### Exception Impact Tracking
Your agent calculates how much specific errors are slowing down the entire warehouse.

### Historical Benchmarking
Your agent compares current receipt speeds against historical percentile distributions.

### Timeline Integrity Checks
Your agent validates that timestamps follow a logical, chronological order.

### Business Hour Accounting
Your agent adjusts all calculations to reflect your actual operating hours.

## Use Cases

### Bottleneck Identification
Find out if the inspection stage is the primary reason for slow inventory availability.

### Data Quality Auditing
Verify that warehouse staff are entering timestamps in the correct chronological order.

### Performance Benchmarking
Compare today's dock-to-stock speeds against the 90th percentile of last month's data.

### Exception Root Cause Analysis
Determine if specific error types are disproportionately increasing total lead times.

## Benefits

- Calculates elapsed time while automatically adjusting for business hours.
- Identifies the specific error types causing logistics delays.
- Provides statistical distributions to compare current performance against history.
- Flags illogical timestamp sequences to ensure data quality.

## How It Works

Connect your preferred AI client to the Vinkius-hosted MCP to start analyzing warehouse data.

1. Connect your AI client to the MCP via Vinkius.
2. Provide the receipt timestamps or historical data to your agent.
3. The agent uses the specific tools to process the math and logic.
4. Your agent returns the calculated metrics, benchmarks, or error reports.

## Frequently Asked Questions

**How does this MCP handle non-working hours?**
The tool accounts for business hours when calculating the total time elapsed from receipt to putaway.

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

**What happens if my timestamps are out of order?**
The validate_lifecycle_sequence tool will flag the sequence as invalid if the timestamps do not follow a logical order.

**Does this tool calculate stage-specific durations?**
Yes, the calculate_d2s_metrics tool breaks down the time spent in each individual stage of the process.

**How do I find out why my dock-to-stock time is increasing?**
You can use the analyze_exception_contribution tool to see how much specific error types are contributing to the delay.

**How does the tool handle non-working hours?**
The `calculate_d2s_metrics` tool uses a provided business hours configuration to exclude time spent outside of active operational windows.

**Can I analyze the impact of specific errors?**
Yes, you can use `analyze_exception_contribution` to determine how much specific exception codes are contributing to total delays.

**What happens if a timestamp is missing?**
If a required timestamp is missing, `calculate_d2s_metrics` returns a status of 'incomplete' and provides durations only for the completed segments.
