Sri Lanka Payslip
The server provides read-only tools to calculate and review Sri Lankan employee payslips based on official tax and contribution rules.
Calculate a Sri Lanka payslip: Estimate monthly APIT/PAYE, employee EPF (8%), employer EPF (12%), ETF (3%), stamp duty, net pay, and total employer cost for regular primary employment.
Get the Sri Lanka payroll reference: Return maintained assumptions (tax rates, relief, thresholds), official Sri Lankan sources, and scope limits.
Get a Sri Lanka payslip checklist: Obtain a structured checklist of required fields (earnings, deductions, employer contributions) and verification checks for preparing or reviewing a payslip.
Sri Lanka Salary Calculator and Payslip Reference
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 200000Or 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-calculatorimport { calculateSalary } from "sri-lanka-salary-calculator";
const result = calculateSalary({
grossSalary: 200000,
epfEtfEarningsBase: 200000,
});
console.log(result.netPay); // 180975Verify the published examples:
npm testUse 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 APIT/PAYE, EPF, ETF, stamp duty, net pay, and employer cost |
| Retrieve maintained assumptions, scope limits, and official sources |
| 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/mcpThe 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.2Add 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 mcpMachine-readable references
Live OpenAPI: https://mypayslip.lk/openapi.json
Live methodology: https://mypayslip.lk/calculation-methodology.json
Agent guidance: https://mypayslip.lk/llms.txt
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 toolscalculate_sri_lanka_payslipCalculate a Sri Lanka payslipARead-onlyIdempotentInspect
Estimate monthly APIT/PAYE, employee and employer EPF, ETF, stamp duty, net pay, and employer cost for regular primary employment in Sri Lanka.
| Name | Required | Description | Default |
|---|---|---|---|
| grossSalary | Yes | Gross monthly employment income in Sri Lankan rupees | |
| epfEtfEarningsBase | No | EPF/ETF-eligible monthly earnings; defaults to gross salary | |
| otherEmployeeDeductions | No | Optional non-statutory employee deductions, such as a loan repayment |
Output Schema
| Name | Required | Description |
|---|---|---|
| apit | Yes | |
| netPay | Yes | |
| caution | Yes | |
| sources | Yes | |
| currency | Yes | |
| stampDuty | Yes | |
| employeeEpf | Yes | |
| employerEpf | Yes | |
| employerEtf | Yes | |
| grossSalary | Yes | |
| employerCost | Yes | |
| methodologyUrl | Yes | |
| sourceTableYear | Yes | |
| yearOfAssessment | Yes | |
| epfEtfEarningsBase | Yes | |
| payslipGeneratorUrl | Yes | |
| otherEmployeeDeductions | Yes | |
| totalEmployeeDeductions | Yes |
TDQS
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.
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.
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.
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.
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.
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 referenceARead-onlyIdempotentInspect
Return the maintained APIT, EPF, ETF, and stamp-duty assumptions with official Sri Lankan sources and scope limits.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| scope | Yes | |
| period | Yes | |
| sources | Yes | |
| citation | Yes | |
| currency | Yes | |
| openApiUrl | Yes | |
| effectiveFrom | Yes | |
| excludedCases | Yes | |
| methodologyUrl | Yes | |
| provenanceNote | Yes | |
| employeeEpfRate | Yes | |
| employerEpfRate | Yes | |
| employerEtfRate | Yes | |
| sourceTableYear | Yes | |
| yearOfAssessment | Yes | |
| monthlyApitRelief | Yes | |
| stampDutyThreshold | Yes | |
| stampDutyAboveThreshold | Yes | |
| machineReadableMethodologyUrl | Yes |
TDQS
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.
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.
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.
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.
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.
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 checklistARead-onlyIdempotentInspect
Return the fields and checks needed to prepare or review a Sri Lankan employee payslip.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| sources | Yes | |
| earnings | Yes | |
| guideUrl | Yes | |
| evidenceNote | Yes | |
| generatorUrl | Yes | |
| identityAndPeriod | Yes | |
| employeeDeductions | Yes | |
| verificationChecks | Yes | |
| employerContributions | Yes |
TDQS
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.
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.
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.
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.
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.
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.
3 tool updates
v2026.27.2- First observed
calculate_sri_lanka_payslip - First observed
get_sri_lanka_payroll_reference - First observed
get_sri_lanka_payslip_checklist
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: calculation, reference data, and checklist. No overlap or ambiguity exists.
All tool names follow a consistent verb_noun pattern (calculate_..., get_...) with clear, descriptive nouns. No mixed conventions.
Three tools is a reasonable scope for a niche payslip server, covering calculation, reference, and checklist. It is not overly thin or excessive.
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
Related MCP Connectors
Nigeria PAYE, VAT and CBN rates, sourced and dated. Plus invoice totals, QR codes, JSON, Base64.
Verified 2026 Canadian payroll math: employer total cost, employee take-home, net-to-gross. Free.
Live US paycheck and payroll-tax math for 2026, all 50 states and DC, powered by tools-berry.com.
Malaysian SME accounting, e-Invoice and payroll for your AI. 64 tools; writes are approved drafts.
Related MCP Servers
- AlicenseBqualityAmaintenance39 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).4453712MIT
- FlicenseNot gradedqualityBmaintenance24 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.-
- AlicenseAqualityBmaintenanceTaiwan 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.91MIT
- AlicenseNot gradedqualityBmaintenanceCalculate income tax (UK/US brackets), EU VAT, UK corporation tax, and capital gains tax. Provides estimates only - not professional tax advice.5MIT