Skip to main content
Glama

HR & Payroll Rules Oracle

End-of-service gratuity / award

end_of_service
Read-onlyIdempotent

Compute the end-of-service gratuity (UAE Art. 51: 21 days' basic wage per year for 5 years then 30, capped at 2 years' wage, pro rata, unpaid days excluded) or the Saudi award (Art. 84/85/87: half a month's actual wage per year for 5 years then a full month, resignation fractions ⅓/⅔/full). Returns the step-by-step computation. Example: country 'AE', start_date '2019-03-01', end_date '2026-10-31', basic_monthly_wage 8000, termination 'resignation'. Response: result with legal_basis (article) and explanation[] steps, data_confidence (high = official text; medium = translation or recent amendment via secondary source), estimated_items[], sources[] (law URLs), data_version, warnings[] and a not-legal-advice disclaimer.

Input Schema

NameRequiredDescriptionDefault
countryYescountry: 'AE' (UAE private sector, Decree-Law 33/2021) or 'SA' (Saudi Labor Law M/51 incl. 2025 amendments).
end_dateYesLast day of service, YYYY-MM-DD.
start_dateYesFirst day of service, YYYY-MM-DD.
terminationNoHow the contract ended; affects Saudi Art. 85 fractions.termination
special_caseNoSaudi Art. 87 full-award cases on resignation.
unpaid_leave_daysNoDays of unpaid absence to exclude from service (UAE Art. 51(4)).
basic_monthly_wageYesLast basic monthly wage (UAE gratuity base).
total_monthly_wageNoLast total monthly wage incl. regular allowances (Saudi award base). Omit if unknown.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already establish read-only, idempotent behavior. The description adds substantial beyond that: step-by-step output, legal_basis, explanation steps, data_confidence levels, estimated_items, sources, data_version, warnings, and a not-legal-advice disclaimer.

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?

The description front-loads the core computation and legal rules, then gives an example and response shape. It is dense but mostly earns its space, though the formula detail is lengthy.

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?

Given eight parameters, two enums, an output schema, and annotations, the description supplies the legal framework, jurisdiction distinction, example, confidence model, and output caveats. Nothing essential for correct invocation appears missing.

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 description coverage is 100%, so the schema already documents all eight parameters thoroughly. The description adds an example and mentions resignation fractions and unpaid-day exclusion, but most parameter meaning is already carried by the schema.

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?

The description states a specific verb and resource: compute UAE end-of-service gratuity or Saudi award, with the governing articles named. It is clearly distinct from sibling HR calculators such as annual_leave_entitlement or notice_period.

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?

It makes clear when to use the tool: UAE Art. 51 gratuity or Saudi Art. 84/85/87 award, with an example call. It does not explicitly exclude cases or compare against sibling tools, but the end-of-service scope is unambiguous.

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