Skip to main content
Glama
malaysia-payroll-mcp

malaysia-payroll-mcp

by davidyapcc

Calculate EPF (KWSP) contributions

calculate_epf
Read-only

Computes monthly EPF (KWSP) employee and employer contributions for one employee in Malaysia from fixed monthly salary, using the applicable Third Schedule band and citing the band used.

Instructions

Works out the monthly EPF (KWSP) employee and employer contributions for one employee in Malaysia, from the EPF Third Schedule in effect for the pay period, and cites the band used. Fixed monthly salaries only. Include the result's disclaimer in the answer to the user.

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": {
      "monthlySalary": "<monthlySalary>",
      "age": "<age>",
      "citizenship": "<citizenship>"
    },
    "name": "calculate_epf"
  }
}

Input Schema

NameRequiredDescriptionDefault
ageYesThe employee's age in whole years.
payPeriodNoThe calendar month the salary is paid for, as YYYY-MM. It decides which rate tables apply. Defaults to the current month in Malaysia.
citizenshipYesmalaysian, permanent_resident, or non_malaysian (a foreign worker without PR).
monthlySalaryYesMonthly salary in RM, at most 2 decimal places: basic pay plus fixed allowances. Excludes overtime, commission, bonuses and arrears.
registeredWithEpfBefore1Aug1998NoOnly for non_malaysian: true if the employee registered with EPF before 1 Aug 1998, which puts them on the Malaysian rates. Defaults to false.

Output Schema

NameRequiredDescriptionDefault
partYesThe EPF Third Schedule part applied.
totalYesRM
employeeYesRM, deducted from pay.
employerYesRM, paid on top of pay.
citationsYes
payPeriodYes
disclaimerYes
explanationYes
monthlySalaryYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.0

TDQS

A4.3/5.0
Behavior4/5

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

With readOnlyHint and openWorldHint already covering safety and scope, the description adds real behavioral content: it determines rates from the Third Schedule in effect for the pay period, reports which band was used, and imposes a post-processing obligation ('Include the result's disclaimer in the answer to the user') that an agent would otherwise miss. It stops short of describing rounding or what happens at salary/age boundary values.

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

Conciseness5/5

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

Three short sentences, front-loaded with the core action and method, followed by the scope restriction and the output obligation. Nothing is redundant with the title or schema.

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 a five-parameter statutory calculator with full schema coverage, an output schema, and annotations covering read-only/no-open-world behavior, the description covers what the tool computes, the ruleset it applies, the salary scope limit, and the disclaimer duty. Nothing an agent needs in order to select and call it is 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 salary composition (basic plus fixed allowances, exclusions), age, citizenship and the pre-1998 registration flag. The description reinforces the salary restriction and the pay-period/rate-table link but contributes no new parameter-level detail beyond the schema, so the baseline 3 applies.

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 ('Works out the monthly EPF (KWSP) employee and employer contributions'), names the method (EPF Third Schedule for the pay period) and cites the band used. It also carves out scope ('Fixed monthly salaries only') and, through the EPF/KWSP naming, is immediately distinguishable from the MTD, SOCSO/EIS and net-pay siblings.

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?

'Fixed monthly salaries only' is an explicit when-not condition that tells the agent to stop if pay includes variable components. It does not, however, name any alternative for the excluded cases (e.g. variable-pay scenarios or the sibling calculators for other statutory deductions), so routing for out-of-scope inputs is left to inference.

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