Skip to main content
Glama

QuantCalc Retirement Engine

Tax-aware projection with the recommended withdrawal order

run_tax_aware_projection
Read-only

Runs the retirement projection with the household's accounts split by tax type and returns the withdrawal order and Roth-conversion programme the engine selected, its present-value advantage and range against drawing traditional first, and the after-tax success rate. Federal and state income tax (50 states and DC), Social Security taxability, required minimum distributions, Medicare IRMAA surcharges and the early-withdrawal penalty are paid from the portfolio year by year; spending is what the household keeps after tax. The result states every assumption it used, including the defaults for inputs that were not given, and what the engine does not model.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stateNoTwo-letter state of residence (or DC) for state income tax with that state's retirement-income rules. When absent the result states that no state tax was modelled.
pensionNoYearly pension income. Default 0.
annual_qcdNoYearly qualified charitable distribution from the traditional account, in today's dollars, counted against required minimum distributions. Default 0.
birth_yearNoYear of birth, optional. Must match current_age: 2026 minus current_age, or 2025 minus current_age when this year's birthday is still to come (then every tax rule uses the age reached in each calendar year). Sets the RMD start age (73 if born 1951-1959, 75 if born 1960 or later). Default: 2026 minus current_age, stated in the result.
spouse_ageNoSpouse's current age, for married filing jointly: sets the second aged deduction and Medicare surcharge. Default: the same as current_age, stated in the result.
allocationsNoPercentages summing to 100: [US stocks, international stocks, bonds, real estate, cash]. Default [60,10,25,5,0].
birth_monthNoMonth of birth, 1-12, optional. Times the half-year rules: the early-withdrawal penalty ends at 59 and a half, charitable distributions start at 70 and a half, Medicare starts in the birthday month. Default: not given, stated in the result.
current_ageYesCurrent age of the primary person.
roth_balanceYesRoth IRA and Roth 401(k) balance today, in dollars. 0 if none.
ss_start_ageNoAge Social Security starts. Default 67.
filing_statusYesFederal filing status: single, married filing jointly (mfj), married filing separately (mfs) or head of household (hoh).
inflation_rateNoAnnual inflation as a percent, e.g. 2.5. Default 2.5.
retirement_ageNoAge work income stops. Defaults to current age.
returns_sourceNoWhich published return set to use (see list_return_assumption_sources). Default jpmorgan.
annual_spendingYesPlanned yearly spending in today's dollars, after tax: what the household keeps. The engine withdraws enough each year to fund this plus that year's federal, state, Medicare-surcharge and penalty tax.
life_expectancyNoAge the plan must last until. Default 92.
roth_conversionNoThe household's own Roth-conversion plan: a fixed amount per year between two ages. When given, the engine applies it on every path and searches withdrawal orders around it instead of searching its own conversion programmes.
social_securityNoYearly Social Security in today's dollars. Default 0 — and 0 is reported as an explicit assumption, not hidden.
taxable_balanceYesTaxable brokerage and savings today, in dollars. 0 if none. The three balances together are the portfolio.
cost_basis_ratioNoPercentage of the taxable account that is cost basis, 0-100. Default 40, and the result says so when it is assumed.
pension_start_ageNoAge the pension starts. Default 65.
medicare_start_ageNoAge Medicare (and its IRMAA income surcharges) begins. Default 65. The year it begins is charged only for the months from the birthday month.
tax_exempt_interestNoYearly municipal-bond interest, which counts toward Social Security taxability and IRMAA income but is not itself taxed. Default 0.
traditional_balanceYesPre-tax retirement accounts today (traditional IRA, 401(k), 403(b)), in dollars. 0 if none.
monthly_contributionNoMonthly savings until retirement. Default 0.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / birth_month
      Added value: +{
      +  "description": "Month of birth, 1-12, optional. Times the half-year rules: the early-withdrawal penalty ends at 59 and a half, charitable distributions start at 70 and a half, Medicare starts in the birthday month. Default: not given, stated in the result.",
      +  "type": "integer"
      +}
    • addedInput schema / properties / birth_year
      Added value: +{
      +  "description": "Year of birth, optional. Must match current_age: 2026 minus current_age, or 2025 minus current_age when this year's birthday is still to come (then every tax rule uses the age reached in each calendar year). Sets the RMD start age (73 if born 1951-1959, 75 if born 1960 or later). Default: 2026 minus current_age, stated in the result.",
      +  "type": "integer"
      +}
    • changedInput schema / properties / medicare_start_age / description
      Previous value: -"Age Medicare (and its IRMAA income surcharges) begins. Default 65."New value: +"Age Medicare (and its IRMAA income surcharges) begins. Default 65. The year it begins is charged only for the months from the birthday month."
  2. Added
  3. Removed
  4. Added

TDQS

A4/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description goes well beyond them by spelling out which taxes are paid from the portfolio year by year, that spending is after-tax, that every assumption and default is surfaced in the result, and that the engine states what it does not model. This is unusually rich disclosure of modelling behaviour and limits and is fully consistent with readOnlyHint.

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 action and then the returns, with no filler or restatement of the title. The tax-mechanics sentence is dense but every clause carries information (which taxes, paid from portfolio, spending definition).

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?

For a 25-parameter simulation with no output schema, the description covers the inputs' conceptual model (three balances = portfolio, after-tax spending), the return payload, and the guarantee that defaults and unmodelled items are reported. Combined with 100% schema coverage, an agent has what it needs to call and interpret this tool.

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 every one of the 25 parameters is already documented in the schema, including defaults, units and enum values. The description adds essentially no parameter-level detail beyond the state (50 states + DC) and returns_source pointer, which is the correct baseline when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (runs the retirement projection) and enumerates the outputs concretely: withdrawal order, Roth-conversion programme, present-value advantage and range, after-tax success rate. The 'tax-aware' framing implicitly separates it from run_retirement_projection, but the sibling is never named, so the differentiation is inferred rather than stated.

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

Usage Guidelines3/5

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

The description implies when it applies (household with accounts split by tax type, wants a tax-aware answer) and it routes the agent to list_return_assumption_sources for returns_source. It never says when to prefer run_retirement_projection or compare_return_assumptions instead, so the selection guidance is only implied.

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.