Skip to main content
Glama

Foresight Planner

Run a retirement plan

run_plan

Runs a full Foresight Planner retirement plan for a person or couple living in Canada (outside Quebec) or the US, on the person's Foresight Planner account. It returns the chance the money lasts, from simulations on global market history; income tax in the first retirement year and over the whole plan (federal, provincial or state, and the OAS clawback; the whole-plan figure is each path's total, as a mean over the paths); each government benefit (CPP and OAS, or Social Security) and employer pension with its start age and yearly amount from each year a claim starts or a pension ends, as household totals for a couple; spending in the first retirement year and the cash flow that adds up to it: benefits and pensions, employment and other income, dividends and interest, and withdrawals from accounts, less tax and any amount reinvested (withdrawals alone are not the spending), with withdrawals split by account and the year's taxable income before credits; and portfolio value percentiles at key ages (at the end of life on a life-expectancy horizon), all in today's dollars. Use it when a question turns on benefit start ages, pensions, taxes or account types; to compare start ages, call it once per option. If the person hasn't said their age, province or state, savings or spending, ask; don't guess. Pass only what the person said: inputs left out take the plan's defaults, which the result lists as assumptions. Each call uses one of the account's plan runs (the same inputs again within 15 minutes are free), and the result says how many are left. A plan that takes longer than about 40 seconds returns a run_id instead: get its result with get_plan_result. The result links the saved plan on https://foresightplanner.com, where the person sees the year-by-year detail and can change any input.

Input Schema

NameRequiredDescriptionDefault
taxYes
person1Yes
person2No
accountsYes
essentialNofloor_ceiling and yale only: the yearly spending that never flexes, in today's dollars a YEAR, at most withdrawal_amount; the rest can be cut in bad years. Left out, it is the plan builder's default, the smaller of $35,000 and withdrawal_amount. Null is the only value for constant_dollar; under floor_ceiling or yale null makes the WHOLE spending the floor, so none of it flexes.
floor_pctNofloor_ceiling only: the largest yearly cut in real spending, as a FRACTION 0-1 (0.025 means spending can fall at most 2.5% a year below inflation).
plan_nameNoA short name for this scenario as the person would recognise it, e.g. 'CPP at 70' or 'Retire at 60'. Name each option differently when comparing.
allocationNo
ceiling_pctNofloor_ceiling only: the largest yearly raise in real spending, as a FRACTION 0-1 (0.05 means spending can rise at most 5% a year above inflation).
life_eventsNo
random_seedNoSeed for the simulated market paths. A fresh plan fixes it, so runs and comparisons use the same market paths; null draws fresh paths on each new run (the same run_plan call again within 15 minutes returns the earlier run).
block_lengthNoLength in MONTHS of each run of consecutive market history the simulation samples (120 means 10 years). Longer blocks keep more of history's long good and bad spells.
yale_smoothingNoyale only: the weight, as a FRACTION 0-1, on last year's spending grown with inflation; the rest follows the portfolio's value. 1 behaves like constant_dollar, 0 like a fixed percentage of the portfolio.
resident_countryYes
withdrawal_amountYesAnnual spending in today's dollars, after tax, from all sources (benefits, pensions, other income, investment income and withdrawals); not the portfolio withdrawal. Under floor_ceiling and yale it is the first year's spending, which then moves with the portfolio.
withdrawal_strategyNo

Output Schema

NameRequiredDescriptionDefault
summaryYes
benefitsYes
end_agesYesFixed horizon: each person's age at the end of their own horizon, by person label. Null under life expectancy.
plan_urlYesLink to the saved plan on the site, with the year-by-year detail: give it to the person.
runs_leftYes
runs_usedYes
start_ageYes
not_adviceYes
runs_limitYes
assumptionsYes
plan_to_ageYesFixed horizon, one person: their age at plan end. Null for a couple, whose partners plan to their own ages (see end_ages), and under life expectancy, where each path ends at its own sampled death.
runs_windowYesThe period runs_used and runs_limit count over: a year on the Free plan, a calendar month on Pro.
horizon_modeYes
horizon_statsYesLife expectancy: the spread of simulated lifetimes. Null on a fixed horizon.
horizon_yearsYesFixed horizon: the plan's length in years (a couple's longer horizon). Null under life expectancy; see horizon_stats.
n_simulationsYes
plan_end_yearYesFixed horizon: the calendar year the plan ends, at the end of the longest horizon. Null under life expectancy.
lifetime_taxesYesIncome tax over the whole plan: each path's total, as a mean over the paths (not a median), in today's dollars, the OAS clawback included as its own line.
taxes_modelledYes
wealth_at_agesYesFixed horizon: portfolio value at retirement, each year the first person's age is a multiple of 10, and plan end. Null under life expectancy; see wealth_at_end_of_life.
data_attributionYes
household_totalsYesTrue for a couple: benefit and pension amounts cover both partners together.
median_failure_ageYesThe first person's age in the median year money ran out; null when no path ran out.
success_probabilityYes
first_retirement_yearYes
reused_run_started_atYesSet when this answer reused an identical run of the same inputs from this assistant in the last 15 minutes: when that run started. Nothing was charged for this call, so runs_used is unchanged by it. Null for a run of its own.
wealth_at_end_of_lifeYesLife expectancy: portfolio value when each path ends (the last person's death, or a fixed-horizon partner's plan end if later). Null on a fixed horizon.
benefits_after_plan_endYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations (which only say it is not read-only, not destructive, not open-world), it discloses the credit model (one plan run per call, repeats within 15 minutes free, result reports remaining runs), the 40-second timeout handing off to get_plan_result with a run_id, and that a saved plan is created and linked. Omitted inputs defaulting to plan assumptions is also disclosed.

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

Conciseness3/5

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

Purpose and country scope are front-loaded, but the middle is one very long run-on sentence enumerating return values (taxes, benefits, spending cash flow, percentiles) that is hard to parse and partly redundant given an output schema exists. The operational guidance at the end (run_id, credits, saved plan link) is tighter and better placed.

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?

For a 16-parameter simulation tool it covers the essentials an agent needs: scope, when to ask for missing facts, default behaviour, cost per call, timeout handoff, and where results persist. Field-level parameter guidance is left to the schema, and return values are covered by the output schema, so remaining gaps are minor.

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 only 50% across 16 parameters, so the description would need to compensate, and it largely does not address individual parameters. It does add the important calling convention 'Pass only what the person said: inputs left out take the plan's defaults, which the result lists as assumptions', which tells the agent not to fabricate values, but gives no field-level meaning.

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 description opens with a specific verb and resource ('Runs a full Foresight Planner retirement plan') and scopes it to a person or couple in Canada outside Quebec or the US. It is plainly distinguishable from get_plan_result (which fetches a finished run) and retirement_quick_check.

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?

It gives explicit when-to-use criteria ('when a question turns on benefit start ages, pensions, taxes or account types'), an explicit alternative pattern ('to compare start ages, call it once per option'), and a when-not rule ('If the person hasn't said their age, province or state, savings or spending, ask; don't guess').

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