LeaveSheet: WH-347 payroll and PTO accrual

v0.1.0
io.github.tresor4k/leavesheet-mcp Checked 4 hours ago Published 1 month ago

WH-347 certified payroll columns 5-9, fringe 6B reconciliation and PTO accrual balances.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

wh347_payroll_lines WH-347 columns 5-9 for a crew week

Computes columns 2 and 5-9 of the U.S. DOL WH-347 certified payroll form (Rev. January 2025) for one project and one payroll week: hours, 6A rates (OT = base x 1.5), 6B fringe credit, 6C cash in lieu, 7A/7B gross, 8 deductions, 9 net pay, plus fringe paid to each plan and the 6B reconciliation. Amounts are rounded to cents for output only. Same JSON as the `wh347 --json` command. Example: { "workers": [{ "worker": "John Mason", "type": "J", "base_rate": 30, "fringe_health_welfare": 4, "fringe_pension": 2, "st_hours": [8,8,8,8,8], "ot_hours": [4], "other_deductions": 310 }] }.

ParameterTypeDescription
workers *arrayOne entry per worker-week on one project, in WH-347 line order.

wh347_fringe_reconcile WH-347 column 6B fringe reconciliation

Checks that the sum of column 6B (total hours x total fringe $/h, per worker) equals the fringe paid to the four plans (health and welfare, pension, vacation/holiday, training: total hours x plan rate). reconciles = |sum of 6B - sum of plans| < 0.005. Takes the same worker entries as wh347_payroll_lines (only hours and fringe rates matter here).

ParameterTypeDescription
workers *arrayOne entry per worker-week on one project, in WH-347 line order.

pto_accrual PTO balance (accrual, tiers, cap, carryover)

Computes a paid-time-off balance in days at an as-of date: months worked this year (hire month counts in full), years of service (days / 365), effective rate after tenure tiers (tier 2 replaces tier 1), accrued days capped at the annual cap (monthly accrual or annual front-loaded grant prorated in the hire year), carryover capped at the policy maximum, approved leave taken (Monday-Friday workdays minus holidays, half days) and pending leave. left = carryover + accrued - taken, may be negative. No rounding. Year boundary: accrual restarts on January 1; the carryover is the value you enter.

ParameterTypeDescription
as_of *stringBalance date, YYYY-MM-DD.
hire_date *stringHire date, YYYY-MM-DD.
policy *object
carryovernumberCarryover entered from the previous year, in days, before the policy cap.
holidaysarrayNon-working holiday dates, YYYY-MM-DD.
requestsarrayLeave requests. Only approved ones are deducted.
us_federal_holidays_yearsarrayAlso treat the 11 U.S. federal holidays (observed dates) of these years as non-working.