File a pending payroll run draft for a month (a person approves in Taokeh; the run stays a draft)
create_payroll_run_draftFiles a pending draft of a month's payroll run on Payroll → Payroll Runs. When the month has no run, approval creates it as a draft and computes it, as New run followed by Save & recompute does; when the month's run is still a draft, approval sets the given boxes on it and recomputes, as Save & recompute does. Each row names an employee on the run and the boxes to set: allowance, overtime, publicHolidaysWorked, bonus, unpaidLeaveDays, otherDeductions. A box given is set to that value and a box left out stays as it is, so the same row filed twice changes nothing more. Basic salary, days employed, residency and TP1 reliefs are not set here: basic salary is the employee's record (update_employee_draft) and the others are on the run page. The result carries, per employee, the payslip money (basic, allowances, overtime, public-holiday pay, bonus, gross, employee EPF, SOCSO, EIS, SKBBK, PCB, zakat, other deductions, claims, net pay) and the employer contributions, plus the run totals and every note the run gave, as the rolled-back run produced them. Nothing changes until an admin, the Payroll role or a Bookkeeper + payroll login approves in Taokeh. After approval the run is a draft: the connector does not finalize, post, reopen or delete a run, pays nobody, sends no payslip and files nothing with LHDN, KWSP or PERKESO. Refused at filing: a month whose run is finalized or posted, an employee with no payslip on the run, a figure below zero, a run that pays more staff than the company's seats. One draft per month waits at a time; if the run, staff details, leave or claims change before approval, approval refuses and nothing is saved. Admin, or bookkeeper with the payroll role, only; any other connection is refused.
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": {
"month": "<month>"
},
"name": "create_payroll_run_draft"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | A short note for the reviewer: where the figures came from. | |
| rows | No | One row per employee to change, at most 200. The list is the whole set of changes: a revise replaces it entirely. Required when the month's run already exists; left out, a new run is created with the figures its staff records give. | |
| basic | No | Not a filter on this tool. Basic salary is not set through a payroll run draft: it is the employee’s record, changed with update_employee_draft. | |
| month | Yes | The run month, YYYY-MM. | |
| payDate | No | The pay date, YYYY-MM-DD, for a run this draft creates. A run that already exists keeps its own pay date. | |
| residency | No | Not a filter on this tool. Residency is not set through a payroll run draft: it is set on the run page in Taokeh. | |
| tp1Reliefs | No | Not a filter on this tool. TP1 reliefs are not set through a payroll run draft: they come from the employee’s TP1 declaration, or are entered on the run page in Taokeh. | |
| needsReview | No | true flags the draft for the reviewer. | |
| daysEmployed | No | Not a filter on this tool. Days employed is not set through a payroll run draft: it is set on the run page in Taokeh. |