Skip to main content
Glama
Buddhima-JD3

Sri Lanka Payslip

Sri Lanka Salary Calculator and Payslip Reference

sri-lanka-salary-calculator MCP server

An inspectable reference implementation for estimating a regular primary employment payslip in Sri Lanka. It calculates monthly APIT (PAYE), employee EPF, employer EPF, employer ETF, stamp duty, net pay, and employer cost.

The current reference is maintained by MyPayslip.lk for the Sri Lanka 2026/27 year of assessment. The latest regular-employment APIT table published by the Inland Revenue Department is labelled 2025/26; the relief and rates effective from 1 April 2025 remain the basis used for 2026/27.

Try the calculator

No account is required. The hosted calculator runs in the browser, and the public calculation API does not store salary inputs.

Related MCP server: calcfi-mcp

Verified example

For a monthly gross salary and EPF/ETF contribution base of LKR 200,000:

Item

Monthly amount

Gross salary

LKR 200,000

APIT / PAYE

LKR 3,000

Employee EPF (8%)

LKR 16,000

Stamp duty

LKR 25

Estimated net pay

LKR 180,975

Employer EPF (12%)

LKR 24,000

Employer ETF (3%)

LKR 6,000

Run the same case locally:

node examples/calculate.mjs 200000

Or call the hosted read-only API:

curl "https://mypayslip.lk/api/calc?salary=200000"

Reference implementation

calculator.mjs is intentionally dependency-free. It accepts a gross monthly salary and an optional EPF/ETF eligible earnings base. The contribution base should come from payroll records when excluded or unusual payments make it different from gross salary.

Install the package from npm after its first registry release, or directly from this public repository now:

npm install github:Buddhima-JD3/sri-lanka-salary-calculator
import { calculateSalary } from "sri-lanka-salary-calculator";

const result = calculateSalary({
  grossSalary: 200000,
  epfEtfEarningsBase: 200000,
});

console.log(result.netPay); // 180975

Verify the published examples:

npm test

Use with an AI assistant

This repository includes a local Model Context Protocol server built with the official MCP SDK. It gives compatible AI assistants three read-only tools:

Tool

Purpose

calculate_sri_lanka_payslip

Calculate APIT/PAYE, EPF, ETF, stamp duty, net pay, and employer cost

get_sri_lanka_payroll_reference

Retrieve maintained assumptions, scope limits, and official sources

get_sri_lanka_payslip_checklist

Prepare or review the required payslip fields and arithmetic checks

Use the no-auth Streamable HTTP endpoint when the client supports remote MCP servers:

https://mypayslip.lk/api/mcp

The same tools can run locally over stdio. In that mode, salary inputs are not sent to MyPayslip.lk or another external service.

Official MCP Registry: io.github.Buddhima-JD3/sri-lanka-payslip

Agent-oriented installation instructions are available in llms-install.md.

The Registry package is a public AMD64/ARM64 container:

docker run -i --rm ghcr.io/buddhima-jd3/sri-lanka-payslip-mcp:2026.27.2

Add it to an MCP client configuration:

{
  "mcpServers": {
    "sri-lanka-payslip": {
      "command": "npx",
      "args": [
        "-y",
        "github:Buddhima-JD3/sri-lanka-salary-calculator"
      ]
    }
  }
}

Or start it from this repository:

npm install
npm run mcp

Machine-readable references

Primary sources

Scope

This reference covers regular profits from primary employment. Bonus, terminal-benefit, secondary-employment, non-resident, and unusual payroll cases may require a different APIT table or professional review. Results are estimates, not payroll, tax, or legal advice.

When citing a result, use:

MyPayslip.lk, Sri Lanka 2026/27 payslip calculation methodology, verified 17 July 2026.

Available Tools

3 tools
calculate_sri_lanka_payslipCalculate a Sri Lanka payslipA
Read-onlyIdempotent
Inspect

Estimate monthly APIT/PAYE, employee and employer EPF, ETF, stamp duty, net pay, and employer cost for regular primary employment in Sri Lanka.

ParametersJSON Schema
NameRequiredDescriptionDefault
grossSalaryYesGross monthly employment income in Sri Lankan rupees
epfEtfEarningsBaseNoEPF/ETF-eligible monthly earnings; defaults to gross salary
otherEmployeeDeductionsNoOptional non-statutory employee deductions, such as a loan repayment

Output Schema

ParametersJSON Schema
NameRequiredDescription
apitYes
netPayYes
cautionYes
sourcesYes
currencyYes
stampDutyYes
employeeEpfYes
employerEpfYes
employerEtfYes
grossSalaryYes
employerCostYes
methodologyUrlYes
sourceTableYearYes
yearOfAssessmentYes
epfEtfEarningsBaseYes
payslipGeneratorUrlYes
otherEmployeeDeductionsYes
totalEmployeeDeductionsYes

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already mark it as readOnly, idempotent, and non-destructive, so the safety profile is covered. The description adds valuable behavioral context by using 'Estimate' to signal approximate results and 'regular primary employment' to limit scope. There is no contradiction with annotations.

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?

The description is a single, information-dense sentence that front-loads the action and lists all key outputs. There is zero fluff—every phrase earns its place.

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?

With a full input schema, output schema, and safe annotations, the description only needs to convey purpose and scope, which it does well. It lacks explicit mention of assumptions (e.g., tax year, latest rates) but those are likely captured in the output schema, making it adequately complete for this complexity.

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?

Input schema descriptions cover 100% of the 3 parameters (grossSalary, epfEtfEarningsBase, otherEmployeeDeductions), so the description does not need to repeat them. The description adds no extra parameter-level detail, keeping the score at the baseline of 3.

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 starts with 'Estimate' (specific verb) and names the exact resource: monthly APIT/PAYE, EPF, ETF, stamp duty, net pay, and employer cost. This clearly differentiates it from the sibling tools (get_sri_lanka_payroll_reference and get_sri_lanka_payslip_checklist) by focusing on calculation rather than reference or checklist.

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 description provides clear context by specifying 'regular primary employment in Sri Lanka', implying it is for standard single-job monthly payroll. However, it does not explicitly state when not to use it or mention alternatives, so it falls short of a 5.

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

get_sri_lanka_payroll_referenceGet the Sri Lanka payroll referenceA
Read-onlyIdempotent
Inspect

Return the maintained APIT, EPF, ETF, and stamp-duty assumptions with official Sri Lankan sources and scope limits.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
scopeYes
periodYes
sourcesYes
citationYes
currencyYes
openApiUrlYes
effectiveFromYes
excludedCasesYes
methodologyUrlYes
provenanceNoteYes
employeeEpfRateYes
employerEpfRateYes
employerEtfRateYes
sourceTableYearYes
yearOfAssessmentYes
monthlyApitReliefYes
stampDutyThresholdYes
stampDutyAboveThresholdYes
machineReadableMethodologyUrlYes

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, and non-destructive behavior. The description adds value by specifying what data is returned (APIT, EPF, ETF, stamp-duty), that it is maintained, and that sources and scope limits are included—context beyond the annotations.

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?

The description is a single, front-loaded sentence with no redundancy. Every word contributes meaningful information: the verb, the specific data categories, and the qualifying details about sources and scope.

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?

With no parameters, an existing output schema, and simple read-only behavior, the description is sufficient. It covers the purpose, content, and key qualifiers (maintained, official sources, scope limits), leaving detailed return structure to the output schema.

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?

The tool has zero parameters, so the baseline is 4. The description does not need to explain parameter meaning and appropriately remains silent on this front.

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 clearly states the tool's function with a specific verb ('Return') and resource ('maintained APIT, EPF, ETF, and stamp-duty assumptions'), and adds context about official sources and scope limits. This unambiguously distinguishes it from sibling tools like calculate_sri_lanka_payslip and get_sri_lanka_payslip_checklist.

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 usage (when you need reference assumptions) but does not explicitly state when to use this tool versus alternatives, nor does it mention exclusions or sibling tools. It provides clear context but lacks explicit guidance on selection.

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

get_sri_lanka_payslip_checklistGet a Sri Lanka payslip checklistA
Read-onlyIdempotent
Inspect

Return the fields and checks needed to prepare or review a Sri Lankan employee payslip.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
sourcesYes
earningsYes
guideUrlYes
evidenceNoteYes
generatorUrlYes
identityAndPeriodYes
employeeDeductionsYes
verificationChecksYes
employerContributionsYes

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already declare the tool read-only, idempotent, and non-destructive. The description adds that it returns checklist fields, but does not disclose additional behavioral traits such as whether the checklist is static or based on input. Given the strong annotation coverage, a score of 3 is appropriate.

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?

The description is a single, front-loaded sentence with no filler words. It efficiently conveys the tool's purpose without redundancy.

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?

With zero parameters, a rich annotation set, and an output schema, the description is adequate. It communicates the tool's scope (Sri Lankan payslip) and function (return checklist items). No additional context is needed.

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?

The input schema has 0 parameters, so the baseline is 4. The description adds no parameter semantics, but none are needed since the tool requires no input.

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 uses the specific verb 'Return' and identifies the resource as 'fields and checks needed to prepare or review a Sri Lankan employee payslip.' This clearly distinguishes it from siblings like calculate_sri_lanka_payslip (calculation) and get_sri_lanka_payroll_reference (reference).

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 description states the tool returns checklist items 'needed to prepare or review' a payslip, providing clear context for when to use it. It does not explicitly name alternatives or exclude other tools, but the intended use case is evident.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv2026.27.2
    • First observedcalculate_sri_lanka_payslip
    • First observedget_sri_lanka_payroll_reference
    • First observedget_sri_lanka_payslip_checklist

TDQS

A4.4/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: calculation, reference data, and checklist. No overlap or ambiguity exists.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (calculate_..., get_...) with clear, descriptive nouns. No mixed conventions.

Tool Count4/5

Three tools is a reasonable scope for a niche payslip server, covering calculation, reference, and checklist. It is not overly thin or excessive.

Completeness4/5

The server covers the core needs: calculation, assumptions, and checklist. Minor gaps like an update endpoint for assumptions are not critical for a calculation-focused tool.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    A
    maintenance
    39 tax tools for US individual taxpayers — federal/state tax calculations, credits, deductions, retirement strategies, audit risk, and tax planning. All calculations run locally, no data leaves the machine. Supports TY2024 and TY2025 (One Big Beautiful Bill Act).
    44
    537
    12
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    24 free personal-finance and macro tools (mortgage, paycheck, tax, FRED, BLS) for LLM agents. Zero API keys, stdio transport, source-cited from IRS, Federal Reserve, BLS, Treasury, and Freddie Mac.
    -
  • A
    license
    A
    quality
    B
    maintenance
    Taiwan statutory payroll calculation — labor & health insurance, labor pension, 2nd-gen NHI supplementary premium, income-tax withholding, and old-age benefits. Sourced from official gazettes, verified against official sample data.
    9
    1
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Calculate income tax (UK/US brackets), EU VAT, UK corporation tax, and capital gains tax. Provides estimates only - not professional tax advice.
    5
    MIT