# Overtime Calculator MCP

> The Overtime Calculator handles complex labor compensation rules instantly. It establishes base hourly pay, calculates overtime for weekdays and weekends, applies specific night shift premiums, and tracks an employee's time bank balance in one place.

## Overview
- **Category:** productivity
- **Price:** Free
- **Tags:** overtime, payroll, salary, labor, compensation

## Description

Running payroll shouldn't feel like a legal audit. This MCP gives you the reliable engine needed to calculate every piece of labor compensation accurately. You feed it raw hours and pay period details, and it returns the final total, already accounting for complex rules that change by day type or shift time. No more cross-referencing multiple state labor laws in separate spreadsheets. If your current system struggles with night differentials or tracking accrued time against actual wages, this is what you need. When you connect to Vinkius, you get access to the whole catalog of tools, and this Overtime Calculator ensures that payroll compliance doesn't add manual headaches to your week.

## Tools

### calculate_hourly_rate
Sets the standard pay rate for any employee based on their total earnings over a period.

### calculate_night_premium_amount
Figures out extra pay owed specifically for hours logged during designated overnight shifts.

### calculate_overtime_compensation
Determines the dollar value of overtime based on whether it was worked on a weekday or weekend.

### get_time_bank_balance
Checks an employee's current available accrued time credits.

## Prompt Examples

**Prompt:** 
```
What is my hourly rate if I earn $3000 a month for 160 hours?
```

**Response:** 
```
$18.75
```

**Prompt:** 
```
Calculate overtime pay for 5 hours at a $20 rate on a weekend.
```

**Response:** 
```
$200.00
```

**Prompt:** 
```
I have 10 hours of credits and 4 hours of debits in my time bank. What is my balance?
```

**Response:** 
```
6.0 hours (Credit)
```

## Capabilities

### Determine base pay
Sets the standard hourly rate for an employee based on their total earnings over a period.

### Calculate standard overtime pay
Figures out the monetary value of extra hours worked, distinguishing between regular weekdays and weekends.

### Apply night shift premiums
Adds supplemental pay specifically for hours logged during designated overnight shifts.

### Check accrued time balance
Retrieves the current net standing of an employee's banked time credits, showing available leave versus used time.

## Use Cases

### Processing a multi-day shift paycheck
A Payroll Specialist needs to pay an employee who worked 5 hours over the weekend and 3 hours overnight. They run `calculate_hourly_rate` first, then use `calculate_overtime_compensation` for the weekend portion, followed by `calculate_night_premium_amount` for the night shift, getting one final total that is accurate.

### Verifying PTO eligibility
An HR Manager asks if an employee can take a week of vacation. Instead of digging through time sheets, they run `get_time_bank_balance` to confirm the available credits before approving the request.

### Auditing pay discrepancies
A Finance Analyst finds a discrepancy in last month's payroll. They re-run the calculation using all tools, specifically comparing the total compensation derived from `calculate_overtime_compensation` against previous manual records to pinpoint where the error occurred.

### Handling complex shift changes
A company shifts its overnight schedule. The Payroll Specialist must update pay rules instantly, using `calculate_night_premium_amount` to ensure new rates are applied immediately when calculating total compensation.

## Benefits

- You stop manual rate calculations. Use `calculate_hourly_rate` to set the accurate base pay for any employee, eliminating simple math errors from your paycheck cycle.
- Never miss a premium payment again. The system automatically calculates night shift surcharges using `calculate_night_premium_amount`, ensuring compliance for overnight staff.
- Handle varied shifts effortlessly. Use `calculate_overtime_compensation` to distinguish between weekday and weekend overtime pay in a single pass, keeping payroll clean.
- Manage time off without spreadsheets. Check the current standing of leave hours instantly with `get_time_bank_balance`, making HR requests faster than ever.
- Reduces audit risk significantly. By centralizing complex calculations into this MCP, you minimize human error when reconciling labor law requirements.

## How It Works

The bottom line is you get a single, accurate payroll figure that respects all local labor rules without manual intervention.

1. You input the raw data: total hours worked, dates, and base pay details for the period.
2. The MCP runs a multi-stage calculation. It first establishes the standard rate, then conditionally applies premiums (overtime/night shift) before calculating the final compensation amount.
3. Your agent returns the finalized paycheck value and updates the employee’s time bank balance.

## Frequently Asked Questions

**How does I use `calculate_overtime_compensation`?**
`calculate_overtime_compensation` determines overtime value based on whether the hours were worked on a weekday or weekend. You simply provide the total hours and the day type, and it returns the calculated monetary amount.

**What is the purpose of `get_time_bank_balance`?**
This tool checks an employee's current available accrued time credits. It gives you a real-time view of their leave balance, which is vital for managing PTO requests.

**Can this MCP calculate night shift premiums like `calculate_night_premium_amount`?**
Yes, the dedicated tool `calculate_night_premium_amount` calculates the supplemental pay owed specifically when an employee works during designated overnight hours.

**How do I get a base rate with `calculate_hourly_rate`?**
`calculate_hourly_rate` takes total earnings and total worked hours to establish the standard, non-premium pay rate for an employee during the paid period.

**What inputs does `calculate_overtime_compensation` require?**
The tool needs three specific values: the total hours worked, a start date, and an end date. You must provide these parameters to ensure accurate compensation calculations based on whether the days were weekdays or weekends.

**How does `calculate_hourly_rate` relate to other payroll functions?**
The hourly rate output serves as the foundational base pay for all subsequent calculations. When you use this MCP, always run `calculate_hourly_rate` first; it establishes the necessary baseline before determining overtime or night premiums.

**What happens if I try to calculate with negative time using any tool?**
The system prevents calculations based on negative hours. If you pass a negative value for hours, every tool will return an error requiring positive hour counts for all parameters.

**Does `get_time_bank_balance` account for different organizational units?**
Yes, the tool needs a specific employee ID and a department code to pull accurate data. Passing these two identifiers ensures you retrieve the correct time bank standing.