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. Changed2 schema fields changed
    • addedInput schema / properties / balances / properties / recent_conversions
      Added value: +{
      +  "description": "Roth conversions you made in the last 5 calendar years that are NOT yet penalty-free (this year and the 4 before). Each becomes penalty-free on Jan 1 five years after the year it was made; before 59.5 the plan only draws it penalty-free from then. Part of 'roth', not extra to it; with roth_penalty_free, cannot exceed 'roth'. Conversions only: contributions and older conversions go in roth_penalty_free. Default none.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "amount": {
      +        "description": "Dollars converted that year.",
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "year": {
      +        "description": "Calendar year of the conversion (this year or one of the 4 before).",
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "year",
      +      "amount"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 5,
      +  "type": "array"
      +}
    • changedInput schema / properties / balances / properties / roth_penalty_free / description
      Previous value: -"Of the Roth balance, the part that can be withdrawn penalty-free before 59.5 (contributions and conversions at least 5 years old). Default 0; cannot exceed 'roth'."New value: +"Of the Roth balance, the part that can be withdrawn penalty-free before 59.5 (contributions and conversions at least 5 years old). Default 0; cannot exceed 'roth'. More recent conversions go in recent_conversions."
  2. Changed1 schema field changed
    • changedInput schema / properties / advanced / properties / state / properties / exempts_social_security / description
      Previous value: -"The state does not tax Social Security. Default false."New value: +"The state does not tax Social Security. Default: true for IL and PA when 'code' is given, else false."
  3. First observed

TDQS

A4.4/5.0
Behavior5/5

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

With annotations already covering read-only, idempotent, non-destructive behavior, the description still adds substantial operational context: 1-3 second typical runtime, up to ~15s with IRMAA/NIIT, per-solve cap of 5 seconds with the best plan found returned, present-value dollar convention, and a scoping caveat that results are optimal for the stated assumptions and are not tax advice.

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 in sentence one, followed by returns, then caveats and the example-tool pointer — a sensible ordering. The returns sentence is a long enumerated run-on and the runtime/caveat block is dense, but every clause carries information an agent needs given 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?

For a 12-parameter tool with nested objects and no output schema, the description covers purpose, expected outputs, defaults, runtime and solve-failure behavior, dollar convention, and where to get a worked example. Almost nothing an agent needs in order to call it correctly is missing.

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 coverage is 100%, so every parameter including nested objects is already documented in the schema, establishing a baseline of 3. The description reinforces a few constraints (defaults for advanced layers, today's-dollar convention) but adds no semantics the schema does not already carry, such as how recent_conversions interacts with penalty-free age rules beyond what the field text says.

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 first sentence states a specific verb and resource — finding the best Roth conversion amount per plan year — plus the surrounding mechanics (spending funded, taxes paid annually). It is unmistakably distinct from the sibling get_conversion_example, which it explicitly routes to for shape discovery.

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 operational context: advanced layers are off by default, IRMAA/NIIT trigger a slower MILP solve, and the agent is told to call get_conversion_example first when unsure of the request shape. It does not explicitly state when to call check_request or when this tool is the wrong choice, so it stops short of full when/when-not routing.

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