Skip to main content
Glama

Ontario payroll deductions

wenmar_payroll_deductions
Read-only

Works out the deductions from one regular pay in Ontario by CRA's T4127 formulas (Option 1): federal and Ontario income tax, CPP, CPP2 and EI, the net pay, the employer's CPP, CPP2 and EI, and every T4127 factor used with what it means. Takes frequency (weekly, biweekly, semi-monthly or monthly) and gross, the gross pay for the period. federal_claim and provincial_claim are the TD1 claim amounts: left out, each is the basic personal amount (claim code 1), and 0 is claim code 0. pay_date (YYYY-MM-DD) chooses the tables; left out, it is today, and a day outside the tables held is an error that names their dates. ytd_cpp, ytd_cpp2, ytd_ei and ytd_pensionable are what was deducted and earned on earlier pays this calendar year. Money is a number or text such as "2400.00". Ontario only; not for a bonus, commission or retroactive pay. The answer is an estimate and the employer remains liable to CRA for what it deducts and remits: say so, and point to CRA's Payroll Deductions Online Calculator at pdoc_url.

Input Schema

NameRequiredDescriptionDefault
grossYesGross pay for one pay period, in dollars.
ytd_eiNoEI deducted earlier this year.
ytd_cppNoCPP (base and first additional) deducted earlier this year.
pay_dateNoYYYY-MM-DD. Left out: today.
provinceNoOntario only for now. Left out: ON.
ytd_cpp2NoCPP2 deducted earlier this year.
frequencyYes
federal_claimNoFederal TD1 claim amount. Left out: claim code 1.
ytd_pensionableNoPensionable earnings earlier this year.
provincial_claimNoOntario TD1ON claim amount. Left out: claim code 1.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations (readOnlyHint=true, openWorldHint=false) already establish that this is a safe, closed-domain read, so the description adds genuinely new behavior: a pay_date outside the held tables is an error that names the covered dates, the result is an estimate, and the employer remains liable. It also discloses the shape of the response by listing every value returned.

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

Conciseness4/5

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

Front-loaded with the purpose and outputs before diving into parameter semantics, and each sentence carries information. It is dense and long-winded for a single paragraph, but the length is largely justified by 10 parameters and the absence of an output 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?

With no output schema, the description steps in to enumerate the return contents, and it covers defaults, error behavior, scope limits, and the liability disclaimer. An agent has everything it needs to call this correctly and to relay the result honestly.

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?

Schema coverage is already 90%, but the description adds meaning the schema lacks: federal_claim/provincial_claim are TD1 claim amounts where '0 is claim code 0', ytd_cpp/cpp2/ei/pensionable are 'what was deducted and earned on earlier pays this calendar year', and money may be a number or text like "2400.00". The frequency enum is repeated rather than explained, so this is slightly short of a 5.

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?

Opens with a specific verb+resource ('Works out the deductions from one regular pay in Ontario') and enumerates exactly what is computed (federal/Ontario tax, CPP, CPP2, EI, net pay, employer contributions, T4127 factors). An agent immediately knows this is a payroll calculation tool rather than a lookup, and it is trivially distinguishable from the unrelated wenmar siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

States explicit scope and exclusions: 'Ontario only; not for a bonus, commission or retroactive pay', and routes the agent to CRA's Payroll Deductions Online Calculator at pdoc_url. It also defines the error condition for pay_date outside the held tables, so an agent can pre-empt a failed call.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources