Skip to main content
Glama

Uku Palgakalkulaator

Estonian holiday pay (puhkusetasu)

calculate_holiday_pay
Read-onlyIdempotent

Calculate Estonian annual holiday pay (puhkusetasu) the way the law requires: finds the six-month averaging period from the holiday start, leaves public holidays and days without pay out of the divisor, counts bonuses for their earning months, and switches to the unchanged-salary rule when the monthly salary was the same in all six months (then the salary simply continues, no average). Returns the gross holiday pay, the method used in plain words, the average daily pay, the latest payment day (second-to-last working day before the holiday, TLS § 70), and the last day of the holiday with the public holidays it skips. Gross only: for net pay run calculate_salary on the amount.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "holiday_start": "<holiday_start>",
      "days": "<days>"
    },
    "name": "calculate_holiday_pay"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysYesHoliday days to be paid (calendar days; public holidays inside the holiday are not holiday days and push the end out). Basic annual holiday is 28.
bonusesNoBonuses earned over a quarter, half-year or year: only the share of earning months inside the period counts.
absencesNoDays off without wage in the period as date ranges (sick leave, earlier holiday, unpaid leave). Public holidays inside are not counted twice.
languageNoLanguage of the readable breakdown. Pass the user's language: "et" for Estonian, otherwise "en".en
monthly_payNoGross pay earned per month of the period, when it varied: wages, overtime, monthly bonuses. Not earlier holiday pay or sick benefit. Months outside the period are ignored.
absence_daysNoDays off without wage as a plain count (public holidays not included). Added to `absences`.
fixed_salaryNoMonthly gross salary that was the same in all six months of the period (no bonuses, overtime or hourly pay). Then no average is used: the salary continues (regulation no. 91 § 1 lg 1¹).
holiday_startYesFirst day of the holiday, YYYY-MM-DD.
employment_startNoFirst day of employment, when it falls inside the six-month period.
before_first_payday_month_wageNoThe holiday starts before the first payday: the agreed monthly wage.
no_pay_in_period_agreed_salaryNoNo pay at all in the period (long sick leave, parental leave): the monthly wage in force now.

Output Schema

NameRequiredDescriptionDefault
daysYes
yearYes
methodYesaverage: six-month average; unchanged: the same monthly salary continues; agreedWage: no pay in the period, the agreed wage is used.
sourcesYes
total_payYes
gross_noteNo
need_monthNo
period_endYes
denominatorYes
holiday_endYes
holiday_payYesThe amount owed, gross.
bonus_sharesNo
period_startYes
calendar_daysNo
daily_averageYes
holiday_startYes
unchanged_payNo
calculator_urlYes
public_holidaysNo
payment_deadlineYesLatest payment day: the second-to-last calendar working day before the holiday (TLS § 70 lg 2).
method_explanationYes
average_for_comparisonNo
second_to_last_workdayNo
absence_days_subtractedNo
holiday_pay_unrounded_dailyNo
public_holidays_inside_holidayYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish read-only, idempotent, non-destructive, closed-world behavior, and the description adds substantive context beyond that: it discloses the legal basis (TLS § 70, regulation no. 91 § 1 lg 1¹), that the result is gross only, the payment deadline derivation, and that public holidays skipped are reported back.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core verb and rules, and the gross-only caveat is a short trailing sentence. The main sentence is dense and long, but nearly every clause carries a distinct rule or return-value fact rather than filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter tool with a full output schema, the description covers the algorithm, the conditional method selection, the gross-vs-net boundary, and the sibling hand-off. Nothing an agent needs in order to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds meaningful framing: it explains the interaction between bonuses and the averaging period, the fixed_salary no-average branch, and that absences/public holidays are not double-counted – semantics that go slightly beyond the per-field schema text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a precise verb and resource ('Calculate Estonian annual holiday pay (puhkusetasu)') and then enumerates the specific computation rules it applies (six-month averaging, holidays excluded from divisor, bonus earning months, unchanged-salary fallback), so an agent knows exactly which calculation it is getting versus sibling calculators.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes net-pay questions elsewhere: 'Gross only: for net pay run calculate_salary on the amount.' It also signals the conditional path (fixed_salary triggers the unchanged-salary rule). It does not state when to prefer calculate_unused_holiday_compensation or calculate_sick_pay, but guidance for the main ambiguity is present.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources