Skip to main content
Glama

Uku Palgakalkulaator

Compensation for unused holiday on termination

calculate_unused_holiday_compensation
Read-onlyIdempotent

Calculate the compensation for unused annual holiday paid when an Estonian employment ends (TLS § 71): holiday days earned in proportion to the qualifying days, minus days used, times the average daily pay of the six-month period (public holidays and days without pay left out). The unchanged-salary rule of holiday pay does not apply here. Give the period as period_start and period_end to have the public holidays counted.

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": {
      "qualifying_days": "<qualifying_days>",
      "period_pay": "<period_pay>"
    },
    "name": "calculate_unused_holiday_compensation"
  }
}

Input Schema

NameRequiredDescriptionDefault
languageNoLanguage of the readable breakdown. Pass the user's language: "et" for Estonian, otherwise "en".en
days_usedNoHoliday days already used this holiday year.
period_endNoLast day of the averaging period.
period_payYesGross pay earned in the six calendar months before the month the employment ends (or the time employed, if shorter).
annual_daysNoAnnual holiday days in the contract (28 by law; more if agreed).
days_in_yearNoDays in the holiday year: 366 for a leap year.
period_startNoFirst day of the averaging period (alternative to period_calendar_days).
qualifying_daysYesCalendar days that earn holiday in the holiday year: employment days minus parental leave and agreed unpaid leave.
period_absence_daysNoDays without wage in the period (sick leave, earlier holiday, unpaid leave), public holidays not included.
period_calendar_daysNoCalendar days of that period. Or give period_start and period_end and the server counts the days and public holidays.
period_public_holidaysNoPublic holidays inside the period. Counted by the server when period_start and period_end are given.

Output Schema

NameRequiredDescriptionDefault
inputsYes
sourcesYes
denominatorYes
earned_daysYes
explanationNo
unused_daysYes
compensationYesCompensation owed, gross.
daily_averageYes
calculator_urlNo
compensation_unrounded_dailyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare the safety profile (readOnly, idempotent, non-destructive, closed-world), so the bar is lower, and the description adds real behavioural content: the full computation formula, the six-month averaging window, exclusion of public holidays and unpaid days, and the fact that the server counts days and holidays when a date range is supplied. It does not discuss validation failures or edge cases such as missing pay data.

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?

Three sentences, front-loaded with the purpose and formula, then the rule exclusion, then the practical input instruction. Dense but every sentence carries information; the legal-section reference and the parenthetical exclusion list are slightly heavy but justified for a payroll calculation.

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

Completeness4/5

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

For an 11-parameter, formula-driven tool with an output schema and full annotation coverage, the description supplies the calculation logic and the period-input convention an agent needs to call it correctly. Minor gaps remain around how the holiday year is bounded relative to the averaging period, but the schema descriptions cover the individual fields.

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 description coverage is 100%, so a baseline of 3 applies, but the description goes beyond it by explaining the relationship between the two period input modes ('give period_start and period_end and the server counts the days and public holidays'). It also clarifies why the six-month window is used and that public holidays and unpaid days are left out of the average, adding meaning to period_pay and period_absence_days.

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 specific verb and resource — 'Calculate the compensation for unused annual holiday paid when an Estonian employment ends' — with the legal basis (TLS § 71) and the exact computation inputs. An agent can distinguish this from the siblings calculate_holiday_pay and calculate_sick_pay purely from the text.

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?

The trigger condition is explicit (compensation when an Estonian employment ends), and it specifies the input pattern for period_start/period_end so public holidays are counted server-side. It also excludes a rule ('the unchanged-salary rule of holiday pay does not apply here'), but it never names an alternative sibling tool or says when to prefer calculate_holiday_pay instead.

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