# Seasonality Index Calculator MCP

> Seasonality Index Calculator determines how much monthly sales vary from average demand using historical records. It pinpoints peak and trough months in your product cycle, allowing you to accurately forecast needs. The tool generates specific inventory stocking plans—like 'Aggressive' or 'Lean'—so you never overstock or run out of key products.

## Overview
- **Category:** inventory-management
- **Price:** Free
- **Tags:** seasonality, sales-forecasting, inventory-optimization, demand-planning, data-analysis

## Description

Managing inventory based on gut feeling is expensive; it leads to wasted capital and lost sales. This MCP takes raw historical sales data and runs advanced analysis across it. You don't just get a number for each month; the tool figures out the underlying seasonal patterns, calculating monthly indices that show exactly how much demand deviates from a baseline average. Once you know those deviations, you can pinpoint which months are peak sellers and which ones naturally slow down. The system then takes this data to generate concrete stocking recommendations—for instance, suggesting an 'Aggressive' build-up for Q4 or a 'Lean' inventory approach during the summer lull. When you connect your agent via Vinkius, it turns complex spreadsheets into immediate, actionable strategies.

## Tools

### analyze_extremes
Finds and reports the specific months that represent the highest or lowest point in the seasonal sales cycle.

### calculate_seasonal_indices
Processes sales data to calculate monthly indices and remove predictable seasonal variations from the demand figures.

### generate_recommendations
Provides a structured, actionable inventory stocking plan based on calculated seasonality patterns for future months.

## Prompt Examples

**Prompt:** 
```
Calculate seasonal indices for this sales data: [{'month': 1, 'sales': 100}, {'month': 2, 'sales': 120}, ...]
```

**Response:** 
```
The calculation is complete. The seasonal indices show a peak in month 1 and a trough in month 6.
```

**Prompt:** 
```
Identify the peak and trough months from these indices: [{'month': 1, 'index': 1.2}, {'month': 2, 'index': 0.8}]
```

**Response:** 
```
The peak month is month 1 with an index of 1.2, and the trough month is month 2 with an index of 0.8.
```

**Prompt:** 
```
Generate inventory recommendations for a base target of 500 units using these indices: [{'month': 1, 'index': 1.5}]
```

**Response:** 
```
For month 1, an 'Aggressive' stocking posture is recommended with a suggested stock level of 750 units.
```

## Capabilities

### Determine monthly sales deviation
Calculates seasonal indices and deseasonalized demand to show how far each month's actual sales stray from the average.

### Pinpoint peak and low periods
Identifies specific months in the cycle that naturally experience maximum or minimum product demand.

### Generate stocking postures
Outputs concrete inventory plans, such as 'Aggressive' or 'Lean,' based on the analyzed seasonal indices.

## Use Cases

### Preparing for Q4 holiday spikes
An inventory manager sees sales records and knows Q4 is always huge, but doesn't know *how* huge. They use calculate_seasonal_indices to quantify the exact spike factor, then run generate_recommendations to get a precise 'Aggressive' stocking target for that quarter.

### Identifying low-demand slow periods
A product line manager needs to cut costs and avoid overstocking. They use analyze_extremes to pinpoint the trough months, allowing them to adjust purchasing cycles or run targeted sales campaigns before inventory hits zero.

### Validating a new market forecast
A data analyst receives an external forecast that looks too optimistic. They feed the historical data into calculate_seasonal_indices, which provides an objective index calculation to ground the forecast in reality.

## Benefits

- You stop relying on generalized growth estimates. By calculating seasonal indices, you accurately quantify how much every month deviates from the average demand.
- The system identifies specific peak and trough periods using analyze_extremes, letting you know exactly when your product demand is highest or lowest. This prevents costly over-purchasing during slow months.
- Instead of vague advice, generate_recommendations gives concrete stocking postures—like 'Aggressive' or 'Lean.' You get an immediate action plan for procurement.
- You cut through the noise in raw sales data. calculate_seasonal_indices cleans up the numbers, giving you a deseasonalized view that shows true underlying demand trends.
- The ability to link pattern identification (analyze_extremes) directly to strategic advice (generate_recommendations) means your plan is always grounded in actual historical performance.

## How It Works

The bottom line is, you feed it historical numbers, and it gives you an actionable inventory strategy that accounts for predictable seasonal swings.

1. Feed the MCP historical monthly sales data to calculate the initial seasonal indices and deseasonalized demand.
2. Run the resulting index data through the analysis tool to identify definite peak (high) months and trough (low) months in the cycle.
3. Pass the identified patterns and current targets into the recommendation function to receive a specific stocking posture ('Aggressive' or 'Lean') for future periods.

## Frequently Asked Questions

**How do I use calculate_seasonal_indices to clean my sales data?**
It removes predictable seasonal variations from your raw sales figures, giving you a deseasonalized view. This lets you see the true underlying demand trend without being misled by holiday spikes or dips.

**What is the difference between analyze_extremes and calculate_seasonal_indices?**
analyze_extremes just points out the highest and lowest months. calculate_seasonal_indices performs the math, giving you indices that quantify *how* much those peaks and troughs deviate from average.

**Can I use generate_recommendations without first calculating indices?**
No. The recommendations tool requires the seasonal index data to function correctly. It uses the quantified deviation metrics to determine if an 'Aggressive' or 'Lean' posture is appropriate.

**Do I need a lot of historical sales for analyze_extremes?**
Yes, more data equals better results. The tool works best with multiple years of records because it needs enough cycles to establish reliable seasonal patterns.

**What happens if I input malformed data when running `calculate_seasonal_indices`?**
The system throws a specific error message. It tells you exactly which fields are missing or typed incorrectly, so you know where to fix your raw sales data.

**How fast can I expect `generate_recommendations` to run with many years of historical data?**
The tool handles large datasets quickly. You'll receive the stocking recommendations within seconds, even if you feed it records spanning several years.

**If `analyze_extremes` shows a seasonal index for a month, what does that number actually mean?**
The index is a multiplier compared to average demand. For example, an index of 1.2 means you should expect sales in that month to be 20% higher than the overall annual average.

**Do I need any special software or setup before using `analyze_extremes`?**
Nope, no extra setup is required. You simply connect your AI client through Vinkius and call the tool directly in a prompt.

**What is a seasonal index?**
A seasonal index quantifies how much a specific period deviates from the long-term average. A value of 1.0 is neutral, above 1.0 indicates a peak, and below 1.0 indicates a trough.

**How much historical data is required?**
To establish a reliable pattern, the tool requires at least two full years of monthly sales records.

**Can I get inventory recommendations?**
Yes, using the `generate_recommendations` tool, you can receive actionable stocking postures like 'Aggressive' or 'Lean' based on your seasonal indices.