Skip to main content
Glama

calculatePaycheckWithholding

Read-only

Premium only. Returns per-paycheck federal withholding, FICA (Social Security, Medicare, Additional Medicare), and optional state withholding given gross pay and W-4 inputs. Supports both the 2020-or-later and pre-2020 W-4 forms. Requires gross_pay, pay_period, filing_status.

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": {
      "gross_pay": "<gross_pay>",
      "pay_period": "<pay_period>",
      "filing_status": "<filing_status>"
    },
    "name": "calculatePaycheckWithholding"
  }
}

Input Schema

NameRequiredDescriptionDefault
stateNo2-letter US state code. Omit for federal-only calculation.
tax_yearNoTax year (YYYY). Defaults to the current year.
gross_payYesGross pay for the period (in dollars).
ytd_grossNoYear-to-date gross wages before this paycheck. Used to apply the Social Security wage base cap and the 0.9% Additional Medicare tax above $200,000 YTD.
allowancesNoPre-2020 W-4 only. Number of allowances claimed on line 5 of the 2019-or-earlier W-4.
deductionsNoW-4 Step 4(b) annual deductions over the standard deduction (2020+ W-4).
pay_periodYesPay period. One of: weekly, biweekly, semimonthly, monthly, quarterly, semiannually, annually, daily.
w4_versionNoSelects which W-4 worksheet to use: 2020_or_later (default) or pre_2020.2020_or_later
other_incomeNoW-4 Step 4(a) annual other income (2020+ W-4).
filing_statusYesTax filing status. Possible values: single, married (married filing jointly), married_separate, or head_of_household.
multiple_jobsNoW-4 Step 2(c) "multiple jobs" checkbox (2020+ W-4 only).
dependents_amountNoW-4 Step 3 total annual credit for dependents (2020+ W-4).
extra_withholdingNoW-4 Step 4(c) extra per-period withholding (added directly to federal withholding).
pretax_deductionsNoPre-tax deductions for this paycheck (401(k), HSA, cafeteria plans). Reduces taxable wages.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

readOnlyHint=true already tells the agent this is a safe, non-mutating computation, so the bar is lower. The description still adds real behavioral context: it is gated behind a premium entitlement, discloses the exact return components, and notes support for two W-4 worksheet eras.

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?

Three sentences, front-loaded with the 'Premium only' gating condition, followed by output composition, form-version support, and required inputs. No filler, though the required-parameter sentence partly duplicates the schema.

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 no output schema, the description usefully enumerates what is returned (federal withholding, FICA components, optional state withholding), and with full schema coverage the input contract is well covered. A 14-parameter tax tool might still benefit from a note on the W-4 version interaction with allowances vs. the 2020+ fields, but overall it is complete enough to invoke.

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?

Schema description coverage is 100%, so the schema already documents all 14 parameters with enums and defaults, making 3 the baseline. The description only restates the three required fields and summarizes the input domain (gross pay, W-4 inputs) without adding format or constraint detail beyond the schema.

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?

States a specific verb and resource — returns per-paycheck federal withholding, FICA (broken into Social Security, Medicare, Additional Medicare), and optional state withholding — and is clearly distinct from the annual-income-oriented siblings calculateIncomeTax/getIncomeTax. The scope of inputs (gross pay and W-4 inputs) is named up front.

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?

Gives clear applicability context ('Premium only', per-paycheck computations from gross pay plus W-4 inputs) and the required-parameter prerequisites. It does not, however, name an alternative (e.g. calculateIncomeTax for annual liability) or state exclusions, so the agent must infer routing on its own.

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