Skip to main content
Glama

Calculate overtime, Sunday and public holiday pay

overtime_and_premium_pay
Read-only

Calculates BCEA pay for a pay period: ordinary hours, weekday/Saturday overtime (1.5x), Sunday work (1.5x if ordinarily worked, else 2x), and public holiday work (s18). Flags breaches of overtime limits and checks the BCEA earnings threshold (employees above it have no statutory overtime entitlement).

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": {
      "hourly_rate": "<hourly_rate>",
      "ordinary_hours": "<ordinary_hours>"
    },
    "name": "overtime_and_premium_pay"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoYYYY-MM-DD, default today
hourly_rateYesOrdinary hourly rate in rand
sunday_hoursNoHours worked on Sundays in the period. Default 0
ordinary_hoursYesOrdinary hours worked in the period
overtime_hoursNoWeekday/Saturday overtime hours
annual_earningsNoRegular annual earnings, to test the BCEA threshold (optional)
weeks_in_periodNoWeeks covered, used to check the 10h/week overtime cap. Default 1
ordinary_daily_hoursNoHours in a normal shift, for public holiday minimum. Default 9
public_holiday_hoursNoHours worked on public holidays in the period. Default 0
ordinarily_works_sundayNoTrue if Sunday is a normal workday for this worker (paid 1.5x instead of 2x). Default false
public_holiday_is_ordinary_workdayNoTrue if the holiday fell on a day the worker would normally work (BCEA s18(2)); false if not (s18(3)). Default true

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / ordinarily_works_sunday / description
      Added value: +"True if Sunday is a normal workday for this worker (paid 1.5x instead of 2x). Default false"
    • addedInput schema / properties / public_holiday_hours / description
      Added value: +"Hours worked on public holidays in the period. Default 0"
    • addedInput schema / properties / public_holiday_is_ordinary_workday / description
      Added value: +"True if the holiday fell on a day the worker would normally work (BCEA s18(2)); false if not (s18(3)). Default true"
    • addedInput schema / properties / sunday_hours / description
      Added value: +"Hours worked on Sundays in the period. Default 0"
  2. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered; the description adds genuine behavioral context by disclosing the rate rules applied per day type and the two side effects (breach flagging and threshold checking). It stops short of saying how the output is structured or whether breaches are returned as fields or errors, which matters since there is no output schema.

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?

A single dense sentence that front-loads the core function and then lists the computation branches in the order an agent would care about them. The stacked parentheticals are slightly heavy but every clause carries information; nothing is redundant filler.

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 statutory calculator with no output schema, the description covers the rules that drive the computation and warns about the threshold check, which is the main correctness trap. The one real gap is the absence of any statement about the returned result shape, which the agent cannot infer from a missing output schema.

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

Parameters3/5

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

Schema coverage is 100% and every parameter already carries a description including rate-multiplier semantics, so the description adds little beyond what the schema states. The mention of "1.5x if ordinarily worked, else 2x" and s18 parallels the schema's own wording for ordinarily_works_sunday and public_holiday_is_ordinary_workday rather than extending it. Baseline 3 is appropriate when the schema does the heavy lifting.

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 ("Calculates BCEA pay for a pay period") and enumerates exactly which components it computes: ordinary hours, weekday/Saturday overtime at 1.5x, Sunday at 1.5x or 2x, and public holiday under s18. This is clearly distinguishable from siblings like minimum_wage_check and leave_and_termination.

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

Usage Guidelines3/5

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

The description implies the usage context (a pay period with overtime/Sunday/holiday hours) and notes it also flags overtime-limit breaches and tests the earnings threshold, which tells the agent what extra value to expect. However, it names no alternatives and gives no explicit when-not guidance, e.g. it never says to use minimum_wage_check instead when only basic rate compliance is at issue.

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