Skip to main content
Glama

Roth Conversion Calculator

Optimize Roth conversions

optimize_roth_conversions
Read-onlyIdempotent

Find the best Roth conversion amount for each year of a retirement plan, with living expenses funded from the right accounts and tax paid each year. Returns per-year conversions, taxes and balances, the after-tax wealth at the end with vs without conversions, totals, a plain-language plan narrative and the assumptions used. Advanced options (IRMAA, NIIT, real state brackets) are off by default. Runs in 1-3 seconds (up to ~15 with IRMAA/NIIT on a long horizon). All money in today's dollars. Optimal for the stated assumptions; not tax advice. Call get_conversion_example first if unsure of the shape.

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": {
      "age": "<age>",
      "balances": "<balances>"
    },
    "name": "optimize_roth_conversions"
  }
}

Input Schema

NameRequiredDescriptionDefault
ageYesYour age this year. The plan starts now (conversions can begin this year).
filingNoTax filing status. Default 'single'. 'married' = one joint return (both spouses assumed the same age).
end_ageNoPlan until this age (default 90; horizon at most 70 years).
advancedNoAdvanced layers, all OFF by default exactly like the web tool. IRMAA and NIIT make the solve a MILP (a few seconds longer; each solve is capped at 5 s, best plan found is returned).
balancesYesCurrent household balances, dollars. Omitted = 0; at least one must be above 0.
assumptionsNoModeling assumptions; the defaults (same as the web tool) are reported back.
other_incomeNoOther steady ordinary income (pension, rental, part-time pay), today's dollars. Omitted = none.
social_securityNoExpected Social Security (household). Omitted = none.
spending_end_ageNoAge spending ends (default: end of plan).
find_max_spendingNoInstead of fixed spending, solve for the highest constant yearly spending the accounts can fund, ending near $0. Default false.
spending_per_yearNoYearly spending the plan must fund, today's dollars, before income tax. Required unless find_max_spending is true.
spending_start_ageNoAge spending begins (default: now).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world, so the safety profile is covered. The description adds genuinely useful behavior beyond that: expected runtime (1-3 s, up to ~15 s with IRMAA/NIIT), that results are in today's dollars, that the answer is optimal only for the stated assumptions, and an explicit 'not tax advice' disclaimer. It does not describe failure modes or what happens on unsolvable inputs, which the schema only hints at via the MILP note.

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?

The purpose is front-loaded and the remaining sentences each add a distinct fact: return payload, default option state, runtime, units, and the optimality/advice caveat. The single paragraph is dense but not padded; a bulleted split of returns vs. caveats would read marginally faster.

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 12-parameter, deeply nested solver with no output schema, the description covers what the tool computes, the shape of what comes back (per-year conversions, taxes, balances, with/without comparison, totals, narrative, assumptions), runtime expectations, and the meaning of defaults. Nothing an agent needs in order to invoke it correctly is missing.

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 100%, so the baseline is 3 and the schema carries the per-parameter detail. The description still adds a global semantic layer: all money is in today's dollars and advanced options (IRMAA, NIIT, real state brackets) are off by default, which sets expectations across roughly a third of the parameters at once.

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?

The opening sentence states a specific verb and object — find the best Roth conversion amount per year of a retirement plan — plus the surrounding mechanics (living expenses funded, tax paid). It is clearly distinguishable from get_conversion_example and check_request, which are named as siblings.

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?

It gives concrete routing advice ('Call get_conversion_example first if unsure of the shape') and clarifies that advanced layers are off by default, implying the default call path. It does not state when NOT to use this tool or when check_request would be the better entry point, so it stops short of full when/when-not coverage.

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