projectionlab-mcp 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/HOW-IT-WORKS.md +1 -1
- package/MANUAL-SETUP.md +1 -1
- package/REFERENCE.md +7 -7
- package/SETUP-FOR-AGENTS.md +1 -1
- package/dist/bootstrap.js +0 -1
- package/dist/bootstrap.js.map +1 -1
- package/dist/bridge.d.ts +8 -14
- package/dist/config.js +4 -2
- package/dist/config.js.map +1 -1
- package/dist/currentFinances.d.ts +4 -12
- package/dist/currentFinances.js +8 -44
- package/dist/currentFinances.js.map +1 -1
- package/dist/dataModel.d.ts +9 -11
- package/dist/dataModel.js +25 -849
- package/dist/dataModel.js.map +1 -1
- package/dist/diff.d.ts +18 -20
- package/dist/diff.js +57 -172
- package/dist/diff.js.map +1 -1
- package/dist/extensionBridge.d.ts +16 -15
- package/dist/extensionBridge.js +33 -49
- package/dist/extensionBridge.js.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/layout.d.ts +32 -36
- package/dist/layout.js +44 -62
- package/dist/layout.js.map +1 -1
- package/dist/linkedFields.d.ts +74 -0
- package/dist/linkedFields.js +189 -0
- package/dist/linkedFields.js.map +1 -0
- package/dist/pathPatch.d.ts +3 -4
- package/dist/pathPatch.js +8 -8
- package/dist/pathPatch.js.map +1 -1
- package/dist/planSettings.d.ts +4 -6
- package/dist/planSettings.js +5 -9
- package/dist/planSettings.js.map +1 -1
- package/dist/plans.d.ts +24 -5
- package/dist/plans.js +99 -15
- package/dist/plans.js.map +1 -1
- package/dist/realEstate.d.ts +0 -21
- package/dist/realEstate.js +0 -117
- package/dist/realEstate.js.map +1 -1
- package/dist/resources/dataModel.d.ts +2 -6
- package/dist/resources/dataModel.js +24 -55
- package/dist/resources/dataModel.js.map +1 -1
- package/dist/resources/knowledge.d.ts +2 -7
- package/dist/resources/knowledge.js +8 -245
- package/dist/resources/knowledge.js.map +1 -1
- package/dist/resources/planData.js +1 -1
- package/dist/resources/planData.js.map +1 -1
- package/dist/settingsReport.d.ts +25 -0
- package/dist/settingsReport.js +464 -0
- package/dist/settingsReport.js.map +1 -0
- package/dist/settingsReportLayout.d.ts +59 -0
- package/dist/settingsReportLayout.js +367 -0
- package/dist/settingsReportLayout.js.map +1 -0
- package/dist/snapshot.d.ts +1 -2
- package/dist/snapshot.js +2 -2
- package/dist/snapshot.js.map +1 -1
- package/dist/summary.d.ts +3 -8
- package/dist/summary.js +7 -71
- package/dist/summary.js.map +1 -1
- package/dist/tools/bootstrap.js +1 -1
- package/dist/tools/bootstrap.js.map +1 -1
- package/dist/tools/clonePlan.js +3 -3
- package/dist/tools/clonePlan.js.map +1 -1
- package/dist/tools/connection.js +3 -3
- package/dist/tools/connection.js.map +1 -1
- package/dist/tools/deletePlan.js +3 -3
- package/dist/tools/deletePlan.js.map +1 -1
- package/dist/tools/diff.js +17 -23
- package/dist/tools/diff.js.map +1 -1
- package/dist/tools/export.js +2 -2
- package/dist/tools/export.js.map +1 -1
- package/dist/tools/getCurrentFinances.js +8 -48
- package/dist/tools/getCurrentFinances.js.map +1 -1
- package/dist/tools/getPlan.js +2 -4
- package/dist/tools/getPlan.js.map +1 -1
- package/dist/tools/getPlanSection.js +35 -10
- package/dist/tools/getPlanSection.js.map +1 -1
- package/dist/tools/getPlanSettings.js +8 -12
- package/dist/tools/getPlanSettings.js.map +1 -1
- package/dist/tools/restore.js +12 -87
- package/dist/tools/restore.js.map +1 -1
- package/dist/tools/schema.js +16 -71
- package/dist/tools/schema.js.map +1 -1
- package/dist/tools/settingsReport.d.ts +3 -0
- package/dist/tools/settingsReport.js +76 -0
- package/dist/tools/settingsReport.js.map +1 -0
- package/dist/tools/snapshots.js +9 -14
- package/dist/tools/snapshots.js.map +1 -1
- package/dist/tools/summary.js +1 -1
- package/dist/tools/summary.js.map +1 -1
- package/dist/tools/updateAccount.js +16 -26
- package/dist/tools/updateAccount.js.map +1 -1
- package/dist/tools/updatePlanEvent.js +22 -9
- package/dist/tools/updatePlanEvent.js.map +1 -1
- package/dist/tools/updatePlanSection.js +54 -9
- package/dist/tools/updatePlanSection.js.map +1 -1
- package/dist/tools/updatePlanSettings.js +4 -4
- package/dist/tools/updatePlanSettings.js.map +1 -1
- package/dist/tools/writeGuard.d.ts +3 -2
- package/dist/tools/writeGuard.js +5 -4
- package/dist/tools/writeGuard.js.map +1 -1
- package/dist/types/projectionlab.d.ts +4 -5
- package/dist/types/wire.d.ts +1 -1
- package/dist/types/wire.js.map +1 -1
- package/package.json +1 -1
- package/skills/projectionlab/SKILL.md +61 -65
- package/dist/resources/layoutResource.d.ts +0 -19
- package/dist/resources/layoutResource.js +0 -43
- package/dist/resources/layoutResource.js.map +0 -1
|
@@ -1,8 +1,3 @@
|
|
|
1
1
|
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
-
import type { Bridge } from "../bridge.js";
|
|
3
|
-
|
|
4
|
-
export declare const KNOWLEDGE_V4 = "# ProjectionLab & FIRE Reference\n\nCurated concepts for analyzing retirement plans through this MCP server.\n\nProjectionLab v5 is in early access; this reference and the tool descriptions\ndescribe the current release, 4.6.0\n(https://projectionlab.com/help/projectionlab-v5-early-access-guide).\n\n## How to use this reference\n\n- **Explain, do not recommend.** Say what a term means, what ProjectionLab does\n with it, and what the user can look at in the app to decide. Do not tell the\n user what to do with their money and do not predict a personal outcome. This\n is information and education, not personalized financial advice; the decision\n belongs to the user and a licensed professional.\n- **Concepts only; ProjectionLab owns the yearly figures.** The app applies the\n current tax brackets, standard deduction, IRMAA tiers, RMD ages, contribution\n limits and ACA subsidies, and the user sees those numbers in the app (Tax\n Analytics). Never state a yearly figure from memory: they change every year.\n Ask the user to read the current one in ProjectionLab.\n\n## Evidence legend\n\nWhen evaluating plan elements or answering user questions, anchor claims with tags:\n- **[EXACT]**: Verified directly from plan JSON via tool inspection or output.\n- **[INFERRED]**: Derived logically from adjacent plan data or standard rule interactions.\n- **[ASSUMPTION]**: A placeholder, default, or external benchmark where plan data is absent.\n\n## ProjectionLab data model (quick map)\n\n- **plans[]**: each plan is a milestone-driven simulation.\n - **milestones[]**: lifecycle events (retirement, Medicare, death) keyed by\n date/year/milestone-relative criteria. Other events reference milestone IDs.\n Retirement and Life Expectancy always exist in the app and its delete\n control is disabled for them, so never remove either one\n (https://projectionlab.com/help/manage-milestones).\n - **income.events[]**: salary, Social Security, pension, inheritance; start/end\n reference milestone IDs.\n - **expenses.events[]**: living, travel, healthcare, LTC; carry a\n `spendingType` (essential vs discretionary).\n - **accounts.events[]**: investment accounts with `rothConversions`\n schedules, withdrawal rules, and bond/equity allocation glidepaths. A custom\n growth or dividend rate on one account covers its stock portion only; the\n bonds there follow the plan-level bond settings unless that account's bond\n allocation is 0%\n (https://projectionlab.com/help/growth-dividend-settings-chance-of-success).\n - **assets.events[]**: real estate, vehicles with appreciation/depreciation.\n - **variables**: tax settings, inflation, returns, drawdown order, IRMAA,\n estate config.\n - **withdrawalStrategy**: a separate mode, not the plan's normal drawdown\n policy. From the year or milestone it starts, its rule replaces most other\n plan events, such as expenses and asset purchases, so most plans leave it\n off (https://projectionlab.com/help/withdrawal-strategy-mode).\n - **montecarlo**: Chance of Success settings (review only; cannot be run\n remotely). Chance of Success runs many trials over historical market periods\n by default, with randomized (Monte Carlo) sampling as an option\n (https://projectionlab.com/help/plan-vs-chance-of-success).\n - **priorities.events[]**: savings contribution ordering. An \"Always Fund\"\n flow is paid even when income falls short: ProjectionLab sells from other\n accounts to cover it (https://projectionlab.com/help/mandatory-goals).\n- **today / currentFinances**: actual account balances; `accountId` links these\n to plan `accounts.events[]`.\n- Chance of Success trials and projection *math* run only in the ProjectionLab\n UI. This server reads/writes the plan definition; it does not compute\n projections.\n\n## Plan-change outcome metrics\n\nEvaluate a plan change primarily with ProjectionLab's projected ending net worth\nand Chance of Success from a completed simulation. Current Finances net worth is\nan input balance sheet, not an outcome. Mutation before/after values verify that\nthe requested input changed; they do not measure its financial impact. The\nPlugin API currently does not expose a supported calculation/result method, so\nrecalculate both outcomes in the UI after applying a change.\n\n## Account tax vocabulary\n\nUse three words for every account, and use them consistently:\n\n- **taxable**: funded with after-tax money; interest, dividends and gains are\n taxed in the year they are received.\n- **tax-deferred**: traditional 401(k) and IRA. Contributions lower taxable\n income now; withdrawals are taxed as ordinary income later.\n- **tax-free**: Roth accounts, and an HSA spent on healthcare. Qualified\n withdrawals are not taxed.\n\nDo not use \"pre-tax\" or \"post-tax\" as account names; they blur the line between\ntax-deferred and taxable.\n\n## Core FIRE / decumulation concepts\n\n- **Safe Withdrawal Rate (SWR)**: the share of the portfolio taken out in the\n first year of drawdown. The classic \"4% rule\" (Trinity study) is a starting\n heuristic for a 30-year horizon, not a guarantee; a longer horizon argues for\n a lower start. The portfolio withdrawal a plan needs falls as guaranteed\n income (Social Security, pension) switches on.\n- **Sequence-of-returns risk**: poor returns in the first years of drawdown do\n far more damage than the same returns later. Common mitigations: a cash/bond\n bridge, and a **rising-equity glidepath** (\"bond tent\" - most bonds at\n retirement, equity rising after).\n- **Asset location**: which account holds which asset. A common convention\n places bonds in tax-deferred accounts, high-growth equity in tax-free (Roth,\n HSA) accounts, and tax-efficient equity and cash in taxable. Location changes\n after-tax return without changing the overall allocation.\n- **Roth conversion**: moving money from a tax-deferred account into a tax-free\n one. The converted amount is taxed as ordinary income in the year of the\n conversion. A \"Roth conversion ladder\" converts in low-income years (often\n the window after work ends and before Social Security or RMDs start) to fill\n a low bracket, lower later RMDs, and shrink the taxable estate. Paying that\n year's tax from a taxable account rather than from withholding keeps more\n money inside the tax-free account.\n\n## Tax concepts that gate conversions\n\nOnly the shape of each rule is here. ProjectionLab computes with the\ncurrent-year figures, and the user reads them in Tax Analytics. MAGI means\nmodified adjusted gross income; each program (ACA, IRMAA, NIIT) defines it\nslightly differently.\n\n- **Federal income tax brackets**: ordinary income is taxed in bands. Income\n that fills an unused low band is cheap; income pushed into the next band\n costs more. What a conversion costs depends on where it lands.\n- **ACA premium subsidies**: marketplace health coverage is income-tested. In\n some income ranges extra income can cut a subsidy faster than tax does, so\n the effective marginal rate in those pre-Medicare years is higher than the\n bracket alone suggests. Not a factor with employer, retiree or other\n non-marketplace coverage.\n- **IRMAA**: an extra charge on Medicare Part B and Part D premiums. It is set\n by the person's MAGI from two years earlier and comes in tiers, so income\n just over a tier boundary pays the whole higher charge. A conversion in one\n year can raise premiums two years later. If the user is already on Medicare\n when the plan starts, ProjectionLab estimates that lookback income in the\n first two plan years, and the actual rule applies from year 3\n (https://projectionlab.com/help/modeling-irmaa-surcharges).\n- **NIIT (net investment income tax)**: a surtax on investment income (gains,\n dividends, interest, rent) once MAGI is above an income threshold. It raises\n the cost of a year that mixes a conversion with investment income.\n- **Long-term capital gains rate**: while taxable income stays under a\n threshold, long-term gains are taxed at 0%. A low-income year can realize\n some gains at no tax cost before that room is gone.\n- **RMDs (Required Minimum Distributions)**: once a person reaches the RMD age,\n tax-deferred accounts require a withdrawal every year, whether or not the\n cash is needed. A large tax-deferred balance can push those forced\n withdrawals into higher brackets and IRMAA tiers, which is the usual reason\n people convert while their income is still low.\n\n## Analysis checklist\n\n1. Build a lifecycle timeline (phase, date range, milestone trigger).\n2. Cash flow by phase; flag pure-drawdown years and the gap before Social\n Security starts.\n3. Withdrawal rate now and after guaranteed income begins.\n4. Sequence risk: what a poor-return start does to the plan. Only a run in the\n ProjectionLab UI can show it.\n5. Roth conversion efficiency: bracket headroom versus the ACA, IRMAA and NIIT\n ceilings; compare lifetime taxes and net legacy, not just the tax now.\n6. Longevity: does the plan last well past life expectancy?\n7. Inflation: healthcare and long-term care costs rise with inflation and are\n often decades out; check how the plan assumes them.\n\n## ProjectionLab help articles\n\nProjectionLab's own pages, linked for the user and summarized here for a model\nwith no web access. The bracketed tag is the plan section or area this reference\nuses for it. The summaries are ours, not ProjectionLab's wording. Glossary of\nfinancial terms: https://projectionlab.com/financial-terms\n\n- **Withdrawal Strategy mode** [withdrawalStrategy]\n https://projectionlab.com/help/withdrawal-strategy-mode - a comparison mode\n for classic rules (initial percentage, variable percentage withdrawal,\n Guyton-Klinger) that starts at a chosen year or milestone. While it is on,\n its rule replaces most other plan events, so most plans leave it off.\n- **Flows, the cash flow priorities** [priorities]\n https://projectionlab.com/help/cash-flow-priorities - Flows (the\n `priorities` section in the data) send income to savings goals,\n contributions, extra debt payments and transfers, earliest-added first.\n- **Mandatory goals (\"Always Fund\")** [priorities]\n https://projectionlab.com/help/mandatory-goals - an Always Fund flow is paid\n ahead of the other flows, selling from other accounts when income falls short.\n- **Milestones** [milestones]\n https://projectionlab.com/help/manage-milestones - lifecycle markers\n triggered by age, date, balance, or a combination of criteria; other events\n anchor their start and end to them. Retirement and Life Expectancy cannot be\n deleted.\n- **Drawdown order** [variables; the chart is app only]\n https://projectionlab.com/help/drawdown-order-visualization - the order\n accounts are liquidated in to cover a yearly shortfall. The graph and its red\n early-withdrawal penalty line are a UI view of that order.\n- **Roth conversions** [accounts; the optimizer is app only]\n https://projectionlab.com/help/roth-conversion - Optimize searches conversion\n strategies against brackets, IRMAA and legacy goals with a beam search, then\n writes the chosen schedule into the plan's accounts. This server can read and\n edit such a schedule; it cannot run the search.\n- **Bond allocation and location** [accounts, variables]\n https://projectionlab.com/help/bond-allocation-and-overrides - the bond\n percentage is set plan-wide and can be overridden per account, and the other\n accounts adjust to keep the plan-wide target, with a warning when it cannot\n balance. Bond location chooses which accounts hold bonds first.\n- **Custom growth and dividend rates** [accounts]\n https://projectionlab.com/help/growth-dividend-settings-chance-of-success - an\n account's custom growth or dividend rate covers its stock portion; the bond\n portion follows the plan's bond settings unless the account's bond allocation\n is overridden to 0%. In Chance of Success such a rate is either held fixed or\n sampled like the rest of the simulation.\n- **IRMAA surcharges** [variables; the optimizer is app only]\n https://projectionlab.com/help/modeling-irmaa-surcharges - tiered Medicare\n Part B and Part D surcharges set by MAGI two years earlier, where crossing a\n tier by any amount costs the whole surcharge. When the user is already on\n Medicare at plan start, ProjectionLab estimates the lookback income for the\n first two plan years.\n- **Plan vs Chance of Success** [montecarlo; results are app only]\n https://projectionlab.com/help/plan-vs-chance-of-success - the Plan tab is one\n fixed path at fixed growth; Chance of Success runs many trials over historical\n or randomized market data. All other tabs follow the Plan tab, not the trial\n outcomes.\n- **Simulation engine** [app only]\n https://projectionlab.com/help/simulation-engine - the app simulates a full\n year at a time (income, withholding, expenses, debt, dividends, prior-year\n taxes, RMDs) and turns a surplus into savings and a shortfall into\n withdrawals.\n- **Flexible spending** [expenses; the feature is app only]\n https://projectionlab.com/help/flex-spending - an optional rule that raises\n or cuts spending with portfolio performance against earlier all-time highs,\n scoped either to all spending or to discretionary expenses only.\n- **Plugins and external accounts** [Current Finances; app only]\n https://projectionlab.com/help/plugins - ProjectionLab does not link to banks;\n plugins (Lunch Money, YNAB, Monarch, or your own code) write balances into\n Current Finances through the Plugin API, which has to be enabled in account\n settings. This server uses that same API.\n";
|
|
5
|
-
export declare const KNOWLEDGE = "# ProjectionLab & FIRE Reference\n\nCurated concepts for analyzing retirement plans through this MCP server.\n\nProjectionLab v5 is in early access; this reference and the tool descriptions\ndescribe the current release, 4.6.0\n(https://projectionlab.com/help/projectionlab-v5-early-access-guide).\n\n## How to use this reference\n\n- **Explain, do not recommend.** Say what a term means, what ProjectionLab does\n with it, and what the user can look at in the app to decide. Do not tell the\n user what to do with their money and do not predict a personal outcome. This\n is information and education, not personalized financial advice; the decision\n belongs to the user and a licensed professional.\n- **Concepts only; ProjectionLab owns the yearly figures.** The app applies the\n current tax brackets, standard deduction, IRMAA tiers, RMD ages, contribution\n limits and ACA subsidies, and the user sees those numbers in the app (Tax\n Analytics). Never state a yearly figure from memory: they change every year.\n Ask the user to read the current one in ProjectionLab.\n\n## Evidence legend\n\nWhen evaluating plan elements or answering user questions, anchor claims with tags:\n- **[EXACT]**: Verified directly from plan JSON via tool inspection or output.\n- **[INFERRED]**: Derived logically from adjacent plan data or standard rule interactions.\n- **[ASSUMPTION]**: A placeholder, default, or external benchmark where plan data is absent.\n\n## ProjectionLab data model (quick map)\n\n- **plans[]**: each plan is a milestone-driven simulation.\n - **milestones[]**: lifecycle events (retirement, Medicare, death) keyed by\n date/year/milestone-relative criteria. Other events reference milestone IDs.\n Retirement and Life Expectancy always exist in the app and its delete\n control is disabled for them, so never remove either one\n (https://projectionlab.com/help/manage-milestones).\n - **income.events[]**: salary, Social Security, pension, inheritance; start/end\n reference milestone IDs.\n - **expenses.events[]**: living, travel, healthcare, LTC; carry a\n `spendingType` (essential vs discretionary).\n - **accounts.events[]**: investment accounts with `rothConversions`\n schedules, withdrawal rules, and bond/equity allocation glidepaths. A custom\n growth or dividend rate on one account covers its stock portion only; the\n bonds there follow the plan-level bond settings unless that account's bond\n allocation is 0%\n (https://projectionlab.com/help/growth-dividend-settings-chance-of-success).\n - **assets.events[]**: real estate, vehicles with appreciation/depreciation.\n - **variables**: tax settings, inflation, returns, drawdown order, IRMAA,\n estate config.\n - **withdrawalStrategy**: a separate mode, not the plan's normal drawdown\n policy. From the year or milestone it starts, its rule replaces most other\n plan events, such as expenses and asset purchases, so most plans leave it\n off (https://projectionlab.com/help/withdrawal-strategy-mode).\n - **montecarlo**: Chance of Success settings (review only; cannot be run\n remotely). Chance of Success runs many trials over historical market periods\n by default, with randomized (Monte Carlo) sampling as an option\n (https://projectionlab.com/help/plan-vs-chance-of-success).\n - **priorities.events[]**: savings contribution ordering. An \"Always Fund\"\n flow is paid even when income falls short: ProjectionLab sells from other\n accounts to cover it (https://projectionlab.com/help/mandatory-goals).\n- **today / currentFinances**: actual account balances; `accountId` links these\n to plan `accounts.events[]`.\n- Chance of Success trials and projection *math* run only in the ProjectionLab\n UI. This server reads/writes the plan definition; it does not compute\n projections.\n\n## Plan-change outcome metrics\n\nEvaluate a plan change primarily with ProjectionLab's projected ending net worth\nand Chance of Success from a completed simulation. Current Finances net worth is\nan input balance sheet, not an outcome. Mutation before/after values verify that\nthe requested input changed; they do not measure its financial impact. The\nPlugin API currently does not expose a supported calculation/result method, so\nrecalculate both outcomes in the UI after applying a change.\n\n## Account tax vocabulary\n\nUse three words for every account, and use them consistently:\n\n- **taxable**: funded with after-tax money; interest, dividends and gains are\n taxed in the year they are received.\n- **tax-deferred**: traditional 401(k) and IRA. Contributions lower taxable\n income now; withdrawals are taxed as ordinary income later.\n- **tax-free**: Roth accounts, and an HSA spent on healthcare. Qualified\n withdrawals are not taxed.\n\nDo not use \"pre-tax\" or \"post-tax\" as account names; they blur the line between\ntax-deferred and taxable.\n\n## Core FIRE / decumulation concepts\n\n- **Safe Withdrawal Rate (SWR)**: the share of the portfolio taken out in the\n first year of drawdown. The classic \"4% rule\" (Trinity study) is a starting\n heuristic for a 30-year horizon, not a guarantee; a longer horizon argues for\n a lower start. The portfolio withdrawal a plan needs falls as guaranteed\n income (Social Security, pension) switches on.\n- **Sequence-of-returns risk**: poor returns in the first years of drawdown do\n far more damage than the same returns later. Common mitigations: a cash/bond\n bridge, and a **rising-equity glidepath** (\"bond tent\" - most bonds at\n retirement, equity rising after).\n- **Asset location**: which account holds which asset. A common convention\n places bonds in tax-deferred accounts, high-growth equity in tax-free (Roth,\n HSA) accounts, and tax-efficient equity and cash in taxable. Location changes\n after-tax return without changing the overall allocation.\n- **Roth conversion**: moving money from a tax-deferred account into a tax-free\n one. The converted amount is taxed as ordinary income in the year of the\n conversion. A \"Roth conversion ladder\" converts in low-income years (often\n the window after work ends and before Social Security or RMDs start) to fill\n a low bracket, lower later RMDs, and shrink the taxable estate. Paying that\n year's tax from a taxable account rather than from withholding keeps more\n money inside the tax-free account.\n\n## Tax concepts that gate conversions\n\nOnly the shape of each rule is here. ProjectionLab computes with the\ncurrent-year figures, and the user reads them in Tax Analytics. MAGI means\nmodified adjusted gross income; each program (ACA, IRMAA, NIIT) defines it\nslightly differently.\n\n- **Federal income tax brackets**: ordinary income is taxed in bands. Income\n that fills an unused low band is cheap; income pushed into the next band\n costs more. What a conversion costs depends on where it lands.\n- **ACA premium subsidies**: marketplace health coverage is income-tested. In\n some income ranges extra income can cut a subsidy faster than tax does, so\n the effective marginal rate in those pre-Medicare years is higher than the\n bracket alone suggests. Not a factor with employer, retiree or other\n non-marketplace coverage.\n- **IRMAA**: an extra charge on Medicare Part B and Part D premiums. It is set\n by the person's MAGI from two years earlier and comes in tiers, so income\n just over a tier boundary pays the whole higher charge. A conversion in one\n year can raise premiums two years later. If the user is already on Medicare\n when the plan starts, ProjectionLab estimates that lookback income in the\n first two plan years, and the actual rule applies from year 3\n (https://projectionlab.com/help/modeling-irmaa-surcharges).\n- **NIIT (net investment income tax)**: a surtax on investment income (gains,\n dividends, interest, rent) once MAGI is above an income threshold. It raises\n the cost of a year that mixes a conversion with investment income.\n- **Long-term capital gains rate**: while taxable income stays under a\n threshold, long-term gains are taxed at 0%. A low-income year can realize\n some gains at no tax cost before that room is gone.\n- **RMDs (Required Minimum Distributions)**: once a person reaches the RMD age,\n tax-deferred accounts require a withdrawal every year, whether or not the\n cash is needed. A large tax-deferred balance can push those forced\n withdrawals into higher brackets and IRMAA tiers, which is the usual reason\n people convert while their income is still low.\n\n## Analysis checklist\n\n1. Build a lifecycle timeline (phase, date range, milestone trigger).\n2. Cash flow by phase; flag pure-drawdown years and the gap before Social\n Security starts.\n3. Withdrawal rate now and after guaranteed income begins.\n4. Sequence risk: what a poor-return start does to the plan. Only a run in the\n ProjectionLab UI can show it.\n5. Roth conversion efficiency: bracket headroom versus the ACA, IRMAA and NIIT\n ceilings; compare lifetime taxes and net legacy, not just the tax now.\n6. Longevity: does the plan last well past life expectancy?\n7. Inflation: healthcare and long-term care costs rise with inflation and are\n often decades out; check how the plan assumes them.\n\n## ProjectionLab help articles\n\nProjectionLab's own pages, linked for the user and summarized here for a model\nwith no web access. The bracketed tag is the plan section or area this reference\nuses for it. The summaries are ours, not ProjectionLab's wording. Glossary of\nfinancial terms: https://projectionlab.com/financial-terms\n\n- **Withdrawal Strategy mode** [withdrawalStrategy]\n https://projectionlab.com/help/withdrawal-strategy-mode - a comparison mode\n for classic rules (initial percentage, variable percentage withdrawal,\n Guyton-Klinger) that starts at a chosen year or milestone. While it is on,\n its rule replaces most other plan events, so most plans leave it off.\n- **Flows, the cash flow priorities** [priorities]\n https://projectionlab.com/help/cash-flow-priorities - Flows (the\n `priorities` section in the data) send income to savings goals,\n contributions, extra debt payments and transfers, earliest-added first.\n- **Mandatory goals (\"Always Fund\")** [priorities]\n https://projectionlab.com/help/mandatory-goals - an Always Fund flow is paid\n ahead of the other flows, selling from other accounts when income falls short.\n- **Milestones** [milestones]\n https://projectionlab.com/help/manage-milestones - lifecycle markers\n triggered by age, date, balance, or a combination of criteria; other events\n anchor their start and end to them. Retirement and Life Expectancy cannot be\n deleted.\n- **Drawdown order** [variables; the chart is app only]\n https://projectionlab.com/help/drawdown-order-visualization - the order\n accounts are liquidated in to cover a yearly shortfall. The graph and its red\n early-withdrawal penalty line are a UI view of that order.\n- **Roth conversions** [accounts; the optimizer is app only]\n https://projectionlab.com/help/roth-conversion - Optimize searches conversion\n strategies against brackets, IRMAA and legacy goals with a beam search, then\n writes the chosen schedule into the plan's accounts. This server can read and\n edit such a schedule; it cannot run the search.\n- **Bond allocation and location** [accounts, variables]\n https://projectionlab.com/help/bond-allocation-and-overrides - the bond\n percentage is set plan-wide and can be overridden per account, and the other\n accounts adjust to keep the plan-wide target, with a warning when it cannot\n balance. Bond location chooses which accounts hold bonds first.\n- **Custom growth and dividend rates** [accounts]\n https://projectionlab.com/help/growth-dividend-settings-chance-of-success - an\n account's custom growth or dividend rate covers its stock portion; the bond\n portion follows the plan's bond settings unless the account's bond allocation\n is overridden to 0%. In Chance of Success such a rate is either held fixed or\n sampled like the rest of the simulation.\n- **IRMAA surcharges** [variables; the optimizer is app only]\n https://projectionlab.com/help/modeling-irmaa-surcharges - tiered Medicare\n Part B and Part D surcharges set by MAGI two years earlier, where crossing a\n tier by any amount costs the whole surcharge. When the user is already on\n Medicare at plan start, ProjectionLab estimates the lookback income for the\n first two plan years.\n- **Plan vs Chance of Success** [montecarlo; results are app only]\n https://projectionlab.com/help/plan-vs-chance-of-success - the Plan tab is one\n fixed path at fixed growth; Chance of Success runs many trials over historical\n or randomized market data. All other tabs follow the Plan tab, not the trial\n outcomes.\n- **Simulation engine** [app only]\n https://projectionlab.com/help/simulation-engine - the app simulates a full\n year at a time (income, withholding, expenses, debt, dividends, prior-year\n taxes, RMDs) and turns a surplus into savings and a shortfall into\n withdrawals.\n- **Flexible spending** [expenses; the feature is app only]\n https://projectionlab.com/help/flex-spending - an optional rule that raises\n or cuts spending with portfolio performance against earlier all-time highs,\n scoped either to all spending or to discretionary expenses only.\n- **Plugins and external accounts** [Current Finances; app only]\n https://projectionlab.com/help/plugins - ProjectionLab does not link to banks;\n plugins (Lunch Money, YNAB, Monarch, or your own code) write balances into\n Current Finances through the Plugin API, which has to be enabled in account\n settings. This server uses that same API.\n";
|
|
6
|
-
export declare const KNOWLEDGE_V5 = "# ProjectionLab 5 & FIRE Reference\n\nCurated concepts for analyzing retirement plans through this MCP server on ProjectionLab 5.\n\nProjectionLab 5 operates under Plugin API contract 2, using a multi-document export envelope.\n\n## How to use this reference\n\n- **Explain, do not recommend.** Say what a term means, what ProjectionLab does\n with it, and what the user can look at in the app to decide. Do not tell the\n user what to do with their money and do not predict a personal outcome. This\n is information and education, not personalized financial advice; the decision\n belongs to the user and a licensed professional.\n- **Concepts only; ProjectionLab owns the yearly figures.** The app applies the\n current tax brackets, standard deduction, IRMAA tiers, RMD ages, contribution\n limits and ACA subsidies, and the user sees those numbers in the app (Tax\n Analytics). Never state a yearly figure from memory: they change every year.\n Ask the user to read the current one in ProjectionLab.\n\n## Evidence legend\n\nData model entries for ProjectionLab 5 carry the tag `[export-shape]`, meaning the field and its value type appear in a ProjectionLab 5 export; its meaning is not yet confirmed by a stored-value test.\n\nWhen evaluating plan elements or answering user questions, anchor claims with tags:\n- **[EXACT]**: Verified directly from plan JSON via tool inspection or output.\n- **[INFERRED]**: Derived logically from adjacent plan data or standard rule interactions.\n- **[ASSUMPTION]**: A placeholder, default, or external benchmark where plan data is absent.\n\n## ProjectionLab 5 data model (quick map)\n\n- **Root envelope**: `{ schema: 1, exportedAt, documents: { currentFinances, plans, settings, accountHistory } }`.\n Each document carries its own internal `schema` version.\n- **documents.currentFinances**: actual financial state and baseline balance sheet.\n - **household**: member demographics under `household.people.me` and `household.people.spouse`,\n with partnership filing status under `household.partnerStatus`.\n - **accounts**: all financial accounts, debts, and real property, stored as a map keyed by account ID.\n - Each record carries a `kind` discriminator: `\"account\"` (cash, investment, and retirement accounts\n with `balance` and `costBasis`), `\"debt\"` (liabilities with `balance` and optional `securedByAssetId`),\n or `\"real-asset\"` (physical property with `value` and `purchasePrice`).\n - Archived accounts carry an `archivedOn` ISO date string.\n - Supported account types: the Solo 401k, Roth Solo 401k, and SEP IRA account types store as\n `\"401k\"` or `\"roth-401k\"` with `subtype: \"solo\"`, and `\"ira\"` with `subtype: \"sep\"`.\n Observed type strings include `\"taxable\"`, `\"401k\"`, `\"savings\"`, `\"land\"`, and `\"secured-loan\"`.\n- **documents.plans[]**: milestone-driven simulation plans.\n - Plans carry no `active` flag. `settings.plan.activeId` and `settings.plan.baselineId` are\n reported as stored; no plan is treated as the selected plan.\n - Every plan event item carries a `kind` discriminator: `\"account\"`, `\"real-asset\"`,\n `\"income\"`, `\"expense\"`, or `\"priority\"`.\n - Timing for event start and end is defined by structured objects:\n `{ type: \"date\" | \"milestone\" | \"keyword\", value, modifier? }`.\n - **milestones[]**: lifecycle events (retirement, Medicare, death) triggered by date, year, age,\n or milestone-relative criteria. Other events anchor timing to milestone IDs.\n - **income.events[]**: salary, pensions, social security, other income.\n - **expenses.events[]**: living expenses carrying a `spendingType` (`\"essential\"` vs `\"discretionary\"`).\n - **accounts.events[]**: plan investment accounts, linking to Current Finances via `accountId`.\n - **assets.events[]**: real estate and physical assets with appreciation and depreciation, linking\n to Current Finances via `assetId`.\n - **variables**: tax settings, inflation, returns, drawdown order, IRMAA, estate rules.\n - **withdrawalStrategy**: alternative withdrawal policy mode (such as fixed percentage or Guyton-Klinger).\n - **montecarlo**: Chance of Success simulation parameters.\n - **priorities.events[]**: savings contribution ordering and cash flow routing. A priority's\n `accountId` is the id of the plan account event it routes cash to, not a Current Finances account id.\n - Event names need not be unique within a section; address an event by id when its name is ambiguous.\n- **documents.settings**:\n - **plan**: viewing preferences including `activeId` and `baselineId` (reported as stored),\n the account's year alignment (`alignment.type`: `\"calendar\"`, `\"rolling\"`, `\"au-tax\"`,\n `\"uk-tax\"` or `\"custom\"`), and pinned tabs. A plan can override the alignment in\n `variables.alignment`; null or absent means it follows the account.\n - **plugins**: plugin configuration with `enabled` status and `apiKey` (authentication secret,\n redacted on reads; sits at `documents.settings.plugins.apiKey`).\n- **documents.accountHistory**:\n - End-of-year balances, tax cost basis, and asset values tracked by account ID and calendar year\n under `documents.accountHistory.<accountId>.<year>`. Replaces the separate progress section.\n- Simulation math and Chance of Success trials run only in the ProjectionLab UI.\n This server reads the plan and financial definitions; it does not compute projections.\n\n## Plan-change outcome metrics\n\nEvaluate a plan change primarily with ProjectionLab's projected ending net worth\nand Chance of Success from a completed simulation. Current Finances net worth is\nan input balance sheet, not an outcome. Mutation before/after values verify that\nthe requested input changed; they do not measure its financial impact. The\nPlugin API currently does not expose a supported calculation/result method, so\nrecalculate both outcomes in the UI after applying a change.\n\n## Account tax vocabulary\n\nUse three words for every account, and use them consistently:\n\n- **taxable**: funded with after-tax money; interest, dividends and gains are\n taxed in the year they are received.\n- **tax-deferred**: traditional 401(k) and IRA. Contributions lower taxable\n income now; withdrawals are taxed as ordinary income later.\n- **tax-free**: Roth accounts, and an HSA spent on healthcare. Qualified\n withdrawals are not taxed.\n\nDo not use \"pre-tax\" or \"post-tax\" as account names; they blur the line between\ntax-deferred and taxable.\n\n## Core FIRE / decumulation concepts\n\n- **Safe Withdrawal Rate (SWR)**: the share of the portfolio taken out in the\n first year of drawdown. The classic \"4% rule\" (Trinity study) is a starting\n heuristic for a 30-year horizon, not a guarantee; a longer horizon argues for\n a lower start. The portfolio withdrawal a plan needs falls as guaranteed\n income (Social Security, pension) switches on.\n- **Sequence-of-returns risk**: poor returns in the first years of drawdown do\n far more damage than the same returns later. Common mitigations: a cash/bond\n bridge, and a **rising-equity glidepath** (\"bond tent\" - most bonds at\n retirement, equity rising after).\n- **Asset location**: which account holds which asset. A common convention\n places bonds in tax-deferred accounts, high-growth equity in tax-free (Roth,\n HSA) accounts, and tax-efficient equity and cash in taxable. Location changes\n after-tax return without changing the overall allocation.\n- **Roth conversion**: moving money from a tax-deferred account into a tax-free\n one. The converted amount is taxed as ordinary income in the year of the\n conversion. A \"Roth conversion ladder\" converts in low-income years (often\n the window after work ends and before Social Security or RMDs start) to fill\n a low bracket, lower later RMDs, and shrink the taxable estate. Paying that\n year's tax from a taxable account rather than from withholding keeps more\n money inside the tax-free account.\n\n## Tax concepts that gate conversions\n\nOnly the shape of each rule is here. ProjectionLab computes with the\ncurrent-year figures, and the user reads them in Tax Analytics. MAGI means\nmodified adjusted gross income; each program (ACA, IRMAA, NIIT) defines it\nslightly differently.\n\n- **Federal income tax brackets**: ordinary income is taxed in bands. Income\n that fills an unused low band is cheap; income pushed into the next band\n costs more. What a conversion costs depends on where it lands.\n- **ACA premium subsidies**: marketplace health coverage is income-tested. In\n some income ranges extra income can cut a subsidy faster than tax does, so\n the effective marginal rate in those pre-Medicare years is higher than the\n bracket alone suggests. Not a factor with employer, retiree or other\n non-marketplace coverage.\n- **IRMAA**: an extra charge on Medicare Part B and Part D premiums. It is set\n by the person's MAGI from two years earlier and comes in tiers, so income\n just over a tier boundary pays the whole higher charge. A conversion in one\n year can raise premiums two years later. If the user is already on Medicare\n when the plan starts, ProjectionLab estimates that lookback income in the\n first two plan years, and the actual rule applies from year 3\n (https://projectionlab.com/help/modeling-irmaa-surcharges).\n- **NIIT (net investment income tax)**: a surtax on investment income (gains,\n dividends, interest, rent) once MAGI is above an income threshold. It raises\n the cost of a year that mixes a conversion with investment income.\n- **Long-term capital gains rate**: while taxable income stays under a\n threshold, long-term gains are taxed at 0%. A low-income year can realize\n some gains at no tax cost before that room is gone.\n- **RMDs (Required Minimum Distributions)**: once a person reaches the RMD age,\n tax-deferred accounts require a withdrawal every year, whether or not the\n cash is needed. A large tax-deferred balance can push those forced\n withdrawals into higher brackets and IRMAA tiers, which is the usual reason\n people convert while their income is still low.\n\n## Analysis checklist\n\n1. Build a lifecycle timeline (phase, date range, milestone trigger).\n2. Cash flow by phase; flag pure-drawdown years and the gap before Social\n Security starts.\n3. Withdrawal rate now and after guaranteed income begins.\n4. Sequence risk: what a poor-return start does to the plan. Only a run in the\n ProjectionLab UI can show it.\n5. Roth conversion efficiency: bracket headroom versus the ACA, IRMAA and NIIT\n ceilings; compare lifetime taxes and net legacy, not just the tax now.\n6. Longevity: does the plan last well past life expectancy?\n7. Inflation: healthcare and long-term care costs rise with inflation and are\n often decades out; check how the plan assumes them.\n\n## ProjectionLab help articles\n\nProjectionLab's own pages, linked for the user and summarized here for a model\nwith no web access. The bracketed tag is the plan section or area this reference\nuses for it. The summaries are ours, not ProjectionLab's wording. Glossary of\nfinancial terms: https://projectionlab.com/financial-terms\n\n- **Withdrawal Strategy mode** [withdrawalStrategy]\n https://projectionlab.com/help/withdrawal-strategy-mode - a comparison mode\n for classic rules (initial percentage, variable percentage withdrawal,\n Guyton-Klinger) that starts at a chosen year or milestone. While it is on,\n its rule replaces most other plan events, so most plans leave it off.\n- **Flows, the cash flow priorities** [priorities]\n https://projectionlab.com/help/cash-flow-priorities - Flows (the\n `priorities` section in the data) send income to savings goals,\n contributions, extra debt payments and transfers, earliest-added first.\n- **Mandatory goals (\"Always Fund\")** [priorities]\n https://projectionlab.com/help/mandatory-goals - an Always Fund flow is paid\n ahead of the other flows, selling from other accounts when income falls short.\n- **Milestones** [milestones]\n https://projectionlab.com/help/manage-milestones - lifecycle markers\n triggered by age, date, balance, or a combination of criteria; other events\n anchor their start and end to them. Retirement and Life Expectancy cannot be\n deleted.\n- **Drawdown order** [variables; the chart is app only]\n https://projectionlab.com/help/drawdown-order-visualization - the order\n accounts are liquidated in to cover a yearly shortfall. The graph and its red\n early-withdrawal penalty line are a UI view of that order.\n- **Roth conversions** [accounts; the optimizer is app only]\n https://projectionlab.com/help/roth-conversion - Optimize searches conversion\n strategies against brackets, IRMAA and legacy goals with a beam search, then\n writes the chosen schedule into the plan's accounts. This server can read and\n edit such a schedule; it cannot run the search.\n- **Bond allocation and location** [accounts, variables]\n https://projectionlab.com/help/bond-allocation-and-overrides - the bond\n percentage is set plan-wide and can be overridden per account, and the other\n accounts adjust to keep the plan-wide target, with a warning when it cannot\n balance. Bond location chooses which accounts hold bonds first.\n- **Custom growth and dividend rates** [accounts]\n https://projectionlab.com/help/growth-dividend-settings-chance-of-success - an\n account's custom growth or dividend rate covers its stock portion; the bond\n portion follows the plan's bond settings unless the account's bond allocation\n is overridden to 0%. In Chance of Success such a rate is either held fixed or\n sampled like the rest of the simulation.\n- **IRMAA surcharges** [variables; the optimizer is app only]\n https://projectionlab.com/help/modeling-irmaa-surcharges - tiered Medicare\n Part B and Part D surcharges set by MAGI two years earlier, where crossing a\n tier by any amount costs the whole surcharge. When the user is already on\n Medicare at plan start, ProjectionLab estimates the lookback income for the\n first two plan years.\n- **Plan vs Chance of Success** [montecarlo; results are app only]\n https://projectionlab.com/help/plan-vs-chance-of-success - the Plan tab is one\n fixed path at fixed growth; Chance of Success runs many trials over historical\n or randomized market data. All other tabs follow the Plan tab, not the trial\n outcomes.\n- **Simulation engine** [app only]\n https://projectionlab.com/help/simulation-engine - the app simulates a full\n year at a time (income, withholding, expenses, debt, dividends, prior-year\n taxes, RMDs) and turns a surplus into savings and a shortfall into\n withdrawals.\n- **Flexible spending** [expenses; the feature is app only]\n https://projectionlab.com/help/flex-spending - an optional rule that raises\n or cuts spending with portfolio performance against earlier all-time highs,\n scoped either to all spending or to discretionary expenses only.\n- **Plugins and external accounts** [Current Finances; app only]\n https://projectionlab.com/help/plugins - ProjectionLab does not link to banks;\n plugins (Lunch Money, YNAB, Monarch, or your own code) write balances into\n Current Finances through the Plugin API, which has to be enabled in account\n settings. This server uses that same API.\n";
|
|
7
|
-
export declare function renderKnowledgeMarkdown(layout?: ExportLayout): string;
|
|
8
|
-
export declare function registerKnowledgeResource(server: McpServer, bridge?: Bridge): void;
|
|
2
|
+
export declare const KNOWLEDGE = "# ProjectionLab 5 & FIRE Reference\n\nCurated concepts for analyzing retirement plans through this MCP server on ProjectionLab 5.\n\nProjectionLab 5 operates under Plugin API contract 2, using a multi-document export envelope.\n\n## How to use this reference\n\n- **Explain, do not recommend.** Say what a term means, what ProjectionLab does\n with it, and what the user can look at in the app to decide. Do not tell the\n user what to do with their money and do not predict a personal outcome. This\n is information and education, not personalized financial advice; the decision\n belongs to the user and a licensed professional.\n- **Concepts only; ProjectionLab owns the yearly figures.** The app applies the\n current tax brackets, standard deduction, IRMAA tiers, RMD ages, contribution\n limits and ACA subsidies, and the user sees those numbers in the app (Tax\n Analytics). Never state a yearly figure from memory: they change every year.\n Ask the user to read the current one in ProjectionLab.\n\n## Evidence legend\n\nData model entries for ProjectionLab 5 carry the tag `[export-shape]`, meaning the field and its value type appear in a ProjectionLab 5 export; its meaning is not yet confirmed by a stored-value test.\n\nWhen evaluating plan elements or answering user questions, anchor claims with tags:\n- **[EXACT]**: Verified directly from plan JSON via tool inspection or output.\n- **[INFERRED]**: Derived logically from adjacent plan data or standard rule interactions.\n- **[ASSUMPTION]**: A placeholder, default, or external benchmark where plan data is absent.\n\n## ProjectionLab 5 data model (quick map)\n\n- **Root envelope**: `{ schema: 1, exportedAt, documents: { currentFinances, plans, settings, accountHistory } }`.\n Each document carries its own internal `schema` version.\n- **documents.currentFinances**: actual financial state and baseline balance sheet.\n - **household**: member demographics under `household.people.me` and `household.people.spouse`,\n with partnership filing status under `household.partnerStatus`.\n - **accounts**: all financial accounts, debts, and real property, stored as a map keyed by account ID.\n - Each record carries a `kind` discriminator: `\"account\"` (cash, investment, and retirement accounts\n with `balance` and `costBasis`), `\"debt\"` (liabilities with `balance` and optional `securedByAssetId`),\n or `\"real-asset\"` (physical property with `value` and `purchasePrice`).\n - Archived accounts carry an `archivedOn` ISO date string.\n - Supported account types: the Solo 401k, Roth Solo 401k, and SEP IRA account types store as\n `\"401k\"` or `\"roth-401k\"` with `subtype: \"solo\"`, and `\"ira\"` with `subtype: \"sep\"`.\n Observed type strings include `\"taxable\"`, `\"401k\"`, `\"savings\"`, `\"land\"`, and `\"secured-loan\"`.\n- **documents.plans[]**: milestone-driven simulation plans.\n - Plans carry no `active` flag. `settings.plan.activeId` and `settings.plan.baselineId` are\n reported as stored; no plan is treated as the selected plan.\n - Every plan event item carries a `kind` discriminator: `\"account\"`, `\"real-asset\"`,\n `\"income\"`, `\"expense\"`, or `\"priority\"`.\n - Timing for event start and end is defined by structured objects:\n `{ type: \"date\" | \"milestone\" | \"keyword\", value, modifier? }`.\n - **milestones[]**: lifecycle events (retirement, Medicare, death) triggered by date, year, age,\n or milestone-relative criteria. Other events anchor timing to milestone IDs.\n - **income.events[]**: salary, pensions, social security, other income.\n - **expenses.events[]**: living expenses carrying a `spendingType` (`\"essential\"` vs `\"discretionary\"`).\n - **accounts.events[]**: plan investment accounts, linking to Current Finances via `accountId`.\n - **assets.events[]**: real estate and physical assets with appreciation and depreciation, linking\n to Current Finances via `assetId`.\n - **variables**: tax settings, inflation, returns, drawdown order, IRMAA, estate rules.\n - **withdrawalStrategy**: alternative withdrawal policy mode (such as fixed percentage or Guyton-Klinger).\n - **montecarlo**: Chance of Success simulation parameters.\n - **priorities.events[]**: savings contribution ordering and cash flow routing. A priority's\n `accountId` is the id of the plan account event it routes cash to, not a Current Finances account id.\n - Event names need not be unique within a section; address an event by id when its name is ambiguous.\n- **documents.settings**:\n - **plan**: viewing preferences including `activeId` and `baselineId` (reported as stored),\n the account's year alignment (`alignment.type`: `\"calendar\"`, `\"rolling\"`, `\"au-tax\"`,\n `\"uk-tax\"` or `\"custom\"`), and pinned tabs. A plan can override the alignment in\n `variables.alignment`; null or absent means it follows the account.\n - **plugins**: plugin configuration with `enabled` status and `apiKey` (authentication secret,\n redacted on reads; sits at `documents.settings.plugins.apiKey`).\n- **documents.accountHistory**:\n - End-of-year balances, tax cost basis, and asset values tracked by account ID and calendar year\n under `documents.accountHistory.<accountId>.<year>`. Replaces the separate progress section.\n- Simulation math and Chance of Success trials run only in the ProjectionLab UI.\n This server reads the plan and financial definitions; it does not compute projections.\n\n## Plan-change outcome metrics\n\nEvaluate a plan change primarily with ProjectionLab's projected ending net worth\nand Chance of Success from a completed simulation. Current Finances net worth is\nan input balance sheet, not an outcome. Mutation before/after values verify that\nthe requested input changed; they do not measure its financial impact. The\nPlugin API currently does not expose a supported calculation/result method, so\nrecalculate both outcomes in the UI after applying a change.\n\n## Account tax vocabulary\n\nUse three words for every account, and use them consistently:\n\n- **taxable**: funded with after-tax money; interest, dividends and gains are\n taxed in the year they are received.\n- **tax-deferred**: traditional 401(k) and IRA. Contributions lower taxable\n income now; withdrawals are taxed as ordinary income later.\n- **tax-free**: Roth accounts, and an HSA spent on healthcare. Qualified\n withdrawals are not taxed.\n\nDo not use \"pre-tax\" or \"post-tax\" as account names; they blur the line between\ntax-deferred and taxable.\n\n## Core FIRE / decumulation concepts\n\n- **Safe Withdrawal Rate (SWR)**: the share of the portfolio taken out in the\n first year of drawdown. The classic \"4% rule\" (Trinity study) is a starting\n heuristic for a 30-year horizon, not a guarantee; a longer horizon argues for\n a lower start. The portfolio withdrawal a plan needs falls as guaranteed\n income (Social Security, pension) switches on.\n- **Sequence-of-returns risk**: poor returns in the first years of drawdown do\n far more damage than the same returns later. Common mitigations: a cash/bond\n bridge, and a **rising-equity glidepath** (\"bond tent\" - most bonds at\n retirement, equity rising after).\n- **Asset location**: which account holds which asset. A common convention\n places bonds in tax-deferred accounts, high-growth equity in tax-free (Roth,\n HSA) accounts, and tax-efficient equity and cash in taxable. Location changes\n after-tax return without changing the overall allocation.\n- **Roth conversion**: moving money from a tax-deferred account into a tax-free\n one. The converted amount is taxed as ordinary income in the year of the\n conversion. A \"Roth conversion ladder\" converts in low-income years (often\n the window after work ends and before Social Security or RMDs start) to fill\n a low bracket, lower later RMDs, and shrink the taxable estate. Paying that\n year's tax from a taxable account rather than from withholding keeps more\n money inside the tax-free account.\n\n## Tax concepts that gate conversions\n\nOnly the shape of each rule is here. ProjectionLab computes with the\ncurrent-year figures, and the user reads them in Tax Analytics. MAGI means\nmodified adjusted gross income; each program (ACA, IRMAA, NIIT) defines it\nslightly differently.\n\n- **Federal income tax brackets**: ordinary income is taxed in bands. Income\n that fills an unused low band is cheap; income pushed into the next band\n costs more. What a conversion costs depends on where it lands.\n- **ACA premium subsidies**: marketplace health coverage is income-tested. In\n some income ranges extra income can cut a subsidy faster than tax does, so\n the effective marginal rate in those pre-Medicare years is higher than the\n bracket alone suggests. Not a factor with employer, retiree or other\n non-marketplace coverage.\n- **IRMAA**: an extra charge on Medicare Part B and Part D premiums. It is set\n by the person's MAGI from two years earlier and comes in tiers, so income\n just over a tier boundary pays the whole higher charge. A conversion in one\n year can raise premiums two years later. If the user is already on Medicare\n when the plan starts, ProjectionLab estimates that lookback income in the\n first two plan years, and the actual rule applies from year 3\n (https://projectionlab.com/help/modeling-irmaa-surcharges).\n- **NIIT (net investment income tax)**: a surtax on investment income (gains,\n dividends, interest, rent) once MAGI is above an income threshold. It raises\n the cost of a year that mixes a conversion with investment income.\n- **Long-term capital gains rate**: while taxable income stays under a\n threshold, long-term gains are taxed at 0%. A low-income year can realize\n some gains at no tax cost before that room is gone.\n- **RMDs (Required Minimum Distributions)**: once a person reaches the RMD age,\n tax-deferred accounts require a withdrawal every year, whether or not the\n cash is needed. A large tax-deferred balance can push those forced\n withdrawals into higher brackets and IRMAA tiers, which is the usual reason\n people convert while their income is still low.\n\n## Analysis checklist\n\n1. Build a lifecycle timeline (phase, date range, milestone trigger).\n2. Cash flow by phase; flag pure-drawdown years and the gap before Social\n Security starts.\n3. Withdrawal rate now and after guaranteed income begins.\n4. Sequence risk: what a poor-return start does to the plan. Only a run in the\n ProjectionLab UI can show it.\n5. Roth conversion efficiency: bracket headroom versus the ACA, IRMAA and NIIT\n ceilings; compare lifetime taxes and net legacy, not just the tax now.\n6. Longevity: does the plan last well past life expectancy?\n7. Inflation: healthcare and long-term care costs rise with inflation and are\n often decades out; check how the plan assumes them.\n\n## ProjectionLab help articles\n\nProjectionLab's own pages, linked for the user and summarized here for a model\nwith no web access. The bracketed tag is the plan section or area this reference\nuses for it. The summaries are ours, not ProjectionLab's wording. Glossary of\nfinancial terms: https://projectionlab.com/financial-terms\n\n- **Withdrawal Strategy mode** [withdrawalStrategy]\n https://projectionlab.com/help/withdrawal-strategy-mode - a comparison mode\n for classic rules (initial percentage, variable percentage withdrawal,\n Guyton-Klinger) that starts at a chosen year or milestone. While it is on,\n its rule replaces most other plan events, so most plans leave it off.\n- **Flows, the cash flow priorities** [priorities]\n https://projectionlab.com/help/cash-flow-priorities - Flows (the\n `priorities` section in the data) send income to savings goals,\n contributions, extra debt payments and transfers, earliest-added first.\n- **Mandatory goals (\"Always Fund\")** [priorities]\n https://projectionlab.com/help/mandatory-goals - an Always Fund flow is paid\n ahead of the other flows, selling from other accounts when income falls short.\n- **Milestones** [milestones]\n https://projectionlab.com/help/manage-milestones - lifecycle markers\n triggered by age, date, balance, or a combination of criteria; other events\n anchor their start and end to them. Retirement and Life Expectancy cannot be\n deleted.\n- **Drawdown order** [variables; the chart is app only]\n https://projectionlab.com/help/drawdown-order-visualization - the order\n accounts are liquidated in to cover a yearly shortfall. The graph and its red\n early-withdrawal penalty line are a UI view of that order.\n- **Roth conversions** [accounts; the optimizer is app only]\n https://projectionlab.com/help/roth-conversion - Optimize searches conversion\n strategies against brackets, IRMAA and legacy goals with a beam search, then\n writes the chosen schedule into the plan's accounts. This server can read and\n edit such a schedule; it cannot run the search.\n- **Bond allocation and location** [accounts, variables]\n https://projectionlab.com/help/bond-allocation-and-overrides - the bond\n percentage is set plan-wide and can be overridden per account, and the other\n accounts adjust to keep the plan-wide target, with a warning when it cannot\n balance. Bond location chooses which accounts hold bonds first.\n- **Custom growth and dividend rates** [accounts]\n https://projectionlab.com/help/growth-dividend-settings-chance-of-success - an\n account's custom growth or dividend rate covers its stock portion; the bond\n portion follows the plan's bond settings unless the account's bond allocation\n is overridden to 0%. In Chance of Success such a rate is either held fixed or\n sampled like the rest of the simulation.\n- **IRMAA surcharges** [variables; the optimizer is app only]\n https://projectionlab.com/help/modeling-irmaa-surcharges - tiered Medicare\n Part B and Part D surcharges set by MAGI two years earlier, where crossing a\n tier by any amount costs the whole surcharge. When the user is already on\n Medicare at plan start, ProjectionLab estimates the lookback income for the\n first two plan years.\n- **Plan vs Chance of Success** [montecarlo; results are app only]\n https://projectionlab.com/help/plan-vs-chance-of-success - the Plan tab is one\n fixed path at fixed growth; Chance of Success runs many trials over historical\n or randomized market data. All other tabs follow the Plan tab, not the trial\n outcomes.\n- **Simulation engine** [app only]\n https://projectionlab.com/help/simulation-engine - the app simulates a full\n year at a time (income, withholding, expenses, debt, dividends, prior-year\n taxes, RMDs) and turns a surplus into savings and a shortfall into\n withdrawals.\n- **Flexible spending** [expenses; the feature is app only]\n https://projectionlab.com/help/flex-spending - an optional rule that raises\n or cuts spending with portfolio performance against earlier all-time highs,\n scoped either to all spending or to discretionary expenses only.\n- **Plugins and external accounts** [Current Finances; app only]\n https://projectionlab.com/help/plugins - ProjectionLab does not link to banks;\n plugins (Lunch Money, YNAB, Monarch, or your own code) write balances into\n Current Finances through the Plugin API, which has to be enabled in account\n settings. This server uses that same API.\n";
|
|
3
|
+
export declare function registerKnowledgeResource(server: McpServer): void;
|
|
@@ -1,236 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export const KNOWLEDGE_V4 = `# ProjectionLab & FIRE Reference
|
|
3
|
-
|
|
4
|
-
Curated concepts for analyzing retirement plans through this MCP server.
|
|
5
|
-
|
|
6
|
-
ProjectionLab v5 is in early access; this reference and the tool descriptions
|
|
7
|
-
describe the current release, 4.6.0
|
|
8
|
-
(https://projectionlab.com/help/projectionlab-v5-early-access-guide).
|
|
9
|
-
|
|
10
|
-
## How to use this reference
|
|
11
|
-
|
|
12
|
-
- **Explain, do not recommend.** Say what a term means, what ProjectionLab does
|
|
13
|
-
with it, and what the user can look at in the app to decide. Do not tell the
|
|
14
|
-
user what to do with their money and do not predict a personal outcome. This
|
|
15
|
-
is information and education, not personalized financial advice; the decision
|
|
16
|
-
belongs to the user and a licensed professional.
|
|
17
|
-
- **Concepts only; ProjectionLab owns the yearly figures.** The app applies the
|
|
18
|
-
current tax brackets, standard deduction, IRMAA tiers, RMD ages, contribution
|
|
19
|
-
limits and ACA subsidies, and the user sees those numbers in the app (Tax
|
|
20
|
-
Analytics). Never state a yearly figure from memory: they change every year.
|
|
21
|
-
Ask the user to read the current one in ProjectionLab.
|
|
22
|
-
|
|
23
|
-
## Evidence legend
|
|
24
|
-
|
|
25
|
-
When evaluating plan elements or answering user questions, anchor claims with tags:
|
|
26
|
-
- **[EXACT]**: Verified directly from plan JSON via tool inspection or output.
|
|
27
|
-
- **[INFERRED]**: Derived logically from adjacent plan data or standard rule interactions.
|
|
28
|
-
- **[ASSUMPTION]**: A placeholder, default, or external benchmark where plan data is absent.
|
|
29
|
-
|
|
30
|
-
## ProjectionLab data model (quick map)
|
|
31
|
-
|
|
32
|
-
- **plans[]**: each plan is a milestone-driven simulation.
|
|
33
|
-
- **milestones[]**: lifecycle events (retirement, Medicare, death) keyed by
|
|
34
|
-
date/year/milestone-relative criteria. Other events reference milestone IDs.
|
|
35
|
-
Retirement and Life Expectancy always exist in the app and its delete
|
|
36
|
-
control is disabled for them, so never remove either one
|
|
37
|
-
(https://projectionlab.com/help/manage-milestones).
|
|
38
|
-
- **income.events[]**: salary, Social Security, pension, inheritance; start/end
|
|
39
|
-
reference milestone IDs.
|
|
40
|
-
- **expenses.events[]**: living, travel, healthcare, LTC; carry a
|
|
41
|
-
\`spendingType\` (essential vs discretionary).
|
|
42
|
-
- **accounts.events[]**: investment accounts with \`rothConversions\`
|
|
43
|
-
schedules, withdrawal rules, and bond/equity allocation glidepaths. A custom
|
|
44
|
-
growth or dividend rate on one account covers its stock portion only; the
|
|
45
|
-
bonds there follow the plan-level bond settings unless that account's bond
|
|
46
|
-
allocation is 0%
|
|
47
|
-
(https://projectionlab.com/help/growth-dividend-settings-chance-of-success).
|
|
48
|
-
- **assets.events[]**: real estate, vehicles with appreciation/depreciation.
|
|
49
|
-
- **variables**: tax settings, inflation, returns, drawdown order, IRMAA,
|
|
50
|
-
estate config.
|
|
51
|
-
- **withdrawalStrategy**: a separate mode, not the plan's normal drawdown
|
|
52
|
-
policy. From the year or milestone it starts, its rule replaces most other
|
|
53
|
-
plan events, such as expenses and asset purchases, so most plans leave it
|
|
54
|
-
off (https://projectionlab.com/help/withdrawal-strategy-mode).
|
|
55
|
-
- **montecarlo**: Chance of Success settings (review only; cannot be run
|
|
56
|
-
remotely). Chance of Success runs many trials over historical market periods
|
|
57
|
-
by default, with randomized (Monte Carlo) sampling as an option
|
|
58
|
-
(https://projectionlab.com/help/plan-vs-chance-of-success).
|
|
59
|
-
- **priorities.events[]**: savings contribution ordering. An "Always Fund"
|
|
60
|
-
flow is paid even when income falls short: ProjectionLab sells from other
|
|
61
|
-
accounts to cover it (https://projectionlab.com/help/mandatory-goals).
|
|
62
|
-
- **today / currentFinances**: actual account balances; \`accountId\` links these
|
|
63
|
-
to plan \`accounts.events[]\`.
|
|
64
|
-
- Chance of Success trials and projection *math* run only in the ProjectionLab
|
|
65
|
-
UI. This server reads/writes the plan definition; it does not compute
|
|
66
|
-
projections.
|
|
67
|
-
|
|
68
|
-
## Plan-change outcome metrics
|
|
69
|
-
|
|
70
|
-
Evaluate a plan change primarily with ProjectionLab's projected ending net worth
|
|
71
|
-
and Chance of Success from a completed simulation. Current Finances net worth is
|
|
72
|
-
an input balance sheet, not an outcome. Mutation before/after values verify that
|
|
73
|
-
the requested input changed; they do not measure its financial impact. The
|
|
74
|
-
Plugin API currently does not expose a supported calculation/result method, so
|
|
75
|
-
recalculate both outcomes in the UI after applying a change.
|
|
76
|
-
|
|
77
|
-
## Account tax vocabulary
|
|
78
|
-
|
|
79
|
-
Use three words for every account, and use them consistently:
|
|
80
|
-
|
|
81
|
-
- **taxable**: funded with after-tax money; interest, dividends and gains are
|
|
82
|
-
taxed in the year they are received.
|
|
83
|
-
- **tax-deferred**: traditional 401(k) and IRA. Contributions lower taxable
|
|
84
|
-
income now; withdrawals are taxed as ordinary income later.
|
|
85
|
-
- **tax-free**: Roth accounts, and an HSA spent on healthcare. Qualified
|
|
86
|
-
withdrawals are not taxed.
|
|
87
|
-
|
|
88
|
-
Do not use "pre-tax" or "post-tax" as account names; they blur the line between
|
|
89
|
-
tax-deferred and taxable.
|
|
90
|
-
|
|
91
|
-
## Core FIRE / decumulation concepts
|
|
92
|
-
|
|
93
|
-
- **Safe Withdrawal Rate (SWR)**: the share of the portfolio taken out in the
|
|
94
|
-
first year of drawdown. The classic "4% rule" (Trinity study) is a starting
|
|
95
|
-
heuristic for a 30-year horizon, not a guarantee; a longer horizon argues for
|
|
96
|
-
a lower start. The portfolio withdrawal a plan needs falls as guaranteed
|
|
97
|
-
income (Social Security, pension) switches on.
|
|
98
|
-
- **Sequence-of-returns risk**: poor returns in the first years of drawdown do
|
|
99
|
-
far more damage than the same returns later. Common mitigations: a cash/bond
|
|
100
|
-
bridge, and a **rising-equity glidepath** ("bond tent" - most bonds at
|
|
101
|
-
retirement, equity rising after).
|
|
102
|
-
- **Asset location**: which account holds which asset. A common convention
|
|
103
|
-
places bonds in tax-deferred accounts, high-growth equity in tax-free (Roth,
|
|
104
|
-
HSA) accounts, and tax-efficient equity and cash in taxable. Location changes
|
|
105
|
-
after-tax return without changing the overall allocation.
|
|
106
|
-
- **Roth conversion**: moving money from a tax-deferred account into a tax-free
|
|
107
|
-
one. The converted amount is taxed as ordinary income in the year of the
|
|
108
|
-
conversion. A "Roth conversion ladder" converts in low-income years (often
|
|
109
|
-
the window after work ends and before Social Security or RMDs start) to fill
|
|
110
|
-
a low bracket, lower later RMDs, and shrink the taxable estate. Paying that
|
|
111
|
-
year's tax from a taxable account rather than from withholding keeps more
|
|
112
|
-
money inside the tax-free account.
|
|
113
|
-
|
|
114
|
-
## Tax concepts that gate conversions
|
|
115
|
-
|
|
116
|
-
Only the shape of each rule is here. ProjectionLab computes with the
|
|
117
|
-
current-year figures, and the user reads them in Tax Analytics. MAGI means
|
|
118
|
-
modified adjusted gross income; each program (ACA, IRMAA, NIIT) defines it
|
|
119
|
-
slightly differently.
|
|
120
|
-
|
|
121
|
-
- **Federal income tax brackets**: ordinary income is taxed in bands. Income
|
|
122
|
-
that fills an unused low band is cheap; income pushed into the next band
|
|
123
|
-
costs more. What a conversion costs depends on where it lands.
|
|
124
|
-
- **ACA premium subsidies**: marketplace health coverage is income-tested. In
|
|
125
|
-
some income ranges extra income can cut a subsidy faster than tax does, so
|
|
126
|
-
the effective marginal rate in those pre-Medicare years is higher than the
|
|
127
|
-
bracket alone suggests. Not a factor with employer, retiree or other
|
|
128
|
-
non-marketplace coverage.
|
|
129
|
-
- **IRMAA**: an extra charge on Medicare Part B and Part D premiums. It is set
|
|
130
|
-
by the person's MAGI from two years earlier and comes in tiers, so income
|
|
131
|
-
just over a tier boundary pays the whole higher charge. A conversion in one
|
|
132
|
-
year can raise premiums two years later. If the user is already on Medicare
|
|
133
|
-
when the plan starts, ProjectionLab estimates that lookback income in the
|
|
134
|
-
first two plan years, and the actual rule applies from year 3
|
|
135
|
-
(https://projectionlab.com/help/modeling-irmaa-surcharges).
|
|
136
|
-
- **NIIT (net investment income tax)**: a surtax on investment income (gains,
|
|
137
|
-
dividends, interest, rent) once MAGI is above an income threshold. It raises
|
|
138
|
-
the cost of a year that mixes a conversion with investment income.
|
|
139
|
-
- **Long-term capital gains rate**: while taxable income stays under a
|
|
140
|
-
threshold, long-term gains are taxed at 0%. A low-income year can realize
|
|
141
|
-
some gains at no tax cost before that room is gone.
|
|
142
|
-
- **RMDs (Required Minimum Distributions)**: once a person reaches the RMD age,
|
|
143
|
-
tax-deferred accounts require a withdrawal every year, whether or not the
|
|
144
|
-
cash is needed. A large tax-deferred balance can push those forced
|
|
145
|
-
withdrawals into higher brackets and IRMAA tiers, which is the usual reason
|
|
146
|
-
people convert while their income is still low.
|
|
147
|
-
|
|
148
|
-
## Analysis checklist
|
|
149
|
-
|
|
150
|
-
1. Build a lifecycle timeline (phase, date range, milestone trigger).
|
|
151
|
-
2. Cash flow by phase; flag pure-drawdown years and the gap before Social
|
|
152
|
-
Security starts.
|
|
153
|
-
3. Withdrawal rate now and after guaranteed income begins.
|
|
154
|
-
4. Sequence risk: what a poor-return start does to the plan. Only a run in the
|
|
155
|
-
ProjectionLab UI can show it.
|
|
156
|
-
5. Roth conversion efficiency: bracket headroom versus the ACA, IRMAA and NIIT
|
|
157
|
-
ceilings; compare lifetime taxes and net legacy, not just the tax now.
|
|
158
|
-
6. Longevity: does the plan last well past life expectancy?
|
|
159
|
-
7. Inflation: healthcare and long-term care costs rise with inflation and are
|
|
160
|
-
often decades out; check how the plan assumes them.
|
|
161
|
-
|
|
162
|
-
## ProjectionLab help articles
|
|
163
|
-
|
|
164
|
-
ProjectionLab's own pages, linked for the user and summarized here for a model
|
|
165
|
-
with no web access. The bracketed tag is the plan section or area this reference
|
|
166
|
-
uses for it. The summaries are ours, not ProjectionLab's wording. Glossary of
|
|
167
|
-
financial terms: https://projectionlab.com/financial-terms
|
|
168
|
-
|
|
169
|
-
- **Withdrawal Strategy mode** [withdrawalStrategy]
|
|
170
|
-
https://projectionlab.com/help/withdrawal-strategy-mode - a comparison mode
|
|
171
|
-
for classic rules (initial percentage, variable percentage withdrawal,
|
|
172
|
-
Guyton-Klinger) that starts at a chosen year or milestone. While it is on,
|
|
173
|
-
its rule replaces most other plan events, so most plans leave it off.
|
|
174
|
-
- **Flows, the cash flow priorities** [priorities]
|
|
175
|
-
https://projectionlab.com/help/cash-flow-priorities - Flows (the
|
|
176
|
-
\`priorities\` section in the data) send income to savings goals,
|
|
177
|
-
contributions, extra debt payments and transfers, earliest-added first.
|
|
178
|
-
- **Mandatory goals ("Always Fund")** [priorities]
|
|
179
|
-
https://projectionlab.com/help/mandatory-goals - an Always Fund flow is paid
|
|
180
|
-
ahead of the other flows, selling from other accounts when income falls short.
|
|
181
|
-
- **Milestones** [milestones]
|
|
182
|
-
https://projectionlab.com/help/manage-milestones - lifecycle markers
|
|
183
|
-
triggered by age, date, balance, or a combination of criteria; other events
|
|
184
|
-
anchor their start and end to them. Retirement and Life Expectancy cannot be
|
|
185
|
-
deleted.
|
|
186
|
-
- **Drawdown order** [variables; the chart is app only]
|
|
187
|
-
https://projectionlab.com/help/drawdown-order-visualization - the order
|
|
188
|
-
accounts are liquidated in to cover a yearly shortfall. The graph and its red
|
|
189
|
-
early-withdrawal penalty line are a UI view of that order.
|
|
190
|
-
- **Roth conversions** [accounts; the optimizer is app only]
|
|
191
|
-
https://projectionlab.com/help/roth-conversion - Optimize searches conversion
|
|
192
|
-
strategies against brackets, IRMAA and legacy goals with a beam search, then
|
|
193
|
-
writes the chosen schedule into the plan's accounts. This server can read and
|
|
194
|
-
edit such a schedule; it cannot run the search.
|
|
195
|
-
- **Bond allocation and location** [accounts, variables]
|
|
196
|
-
https://projectionlab.com/help/bond-allocation-and-overrides - the bond
|
|
197
|
-
percentage is set plan-wide and can be overridden per account, and the other
|
|
198
|
-
accounts adjust to keep the plan-wide target, with a warning when it cannot
|
|
199
|
-
balance. Bond location chooses which accounts hold bonds first.
|
|
200
|
-
- **Custom growth and dividend rates** [accounts]
|
|
201
|
-
https://projectionlab.com/help/growth-dividend-settings-chance-of-success - an
|
|
202
|
-
account's custom growth or dividend rate covers its stock portion; the bond
|
|
203
|
-
portion follows the plan's bond settings unless the account's bond allocation
|
|
204
|
-
is overridden to 0%. In Chance of Success such a rate is either held fixed or
|
|
205
|
-
sampled like the rest of the simulation.
|
|
206
|
-
- **IRMAA surcharges** [variables; the optimizer is app only]
|
|
207
|
-
https://projectionlab.com/help/modeling-irmaa-surcharges - tiered Medicare
|
|
208
|
-
Part B and Part D surcharges set by MAGI two years earlier, where crossing a
|
|
209
|
-
tier by any amount costs the whole surcharge. When the user is already on
|
|
210
|
-
Medicare at plan start, ProjectionLab estimates the lookback income for the
|
|
211
|
-
first two plan years.
|
|
212
|
-
- **Plan vs Chance of Success** [montecarlo; results are app only]
|
|
213
|
-
https://projectionlab.com/help/plan-vs-chance-of-success - the Plan tab is one
|
|
214
|
-
fixed path at fixed growth; Chance of Success runs many trials over historical
|
|
215
|
-
or randomized market data. All other tabs follow the Plan tab, not the trial
|
|
216
|
-
outcomes.
|
|
217
|
-
- **Simulation engine** [app only]
|
|
218
|
-
https://projectionlab.com/help/simulation-engine - the app simulates a full
|
|
219
|
-
year at a time (income, withholding, expenses, debt, dividends, prior-year
|
|
220
|
-
taxes, RMDs) and turns a surplus into savings and a shortfall into
|
|
221
|
-
withdrawals.
|
|
222
|
-
- **Flexible spending** [expenses; the feature is app only]
|
|
223
|
-
https://projectionlab.com/help/flex-spending - an optional rule that raises
|
|
224
|
-
or cuts spending with portfolio performance against earlier all-time highs,
|
|
225
|
-
scoped either to all spending or to discretionary expenses only.
|
|
226
|
-
- **Plugins and external accounts** [Current Finances; app only]
|
|
227
|
-
https://projectionlab.com/help/plugins - ProjectionLab does not link to banks;
|
|
228
|
-
plugins (Lunch Money, YNAB, Monarch, or your own code) write balances into
|
|
229
|
-
Current Finances through the Plugin API, which has to be enabled in account
|
|
230
|
-
settings. This server uses that same API.
|
|
231
|
-
`;
|
|
232
|
-
export const KNOWLEDGE = KNOWLEDGE_V4;
|
|
233
|
-
export const KNOWLEDGE_V5 = `# ProjectionLab 5 & FIRE Reference
|
|
1
|
+
export const KNOWLEDGE = `# ProjectionLab 5 & FIRE Reference
|
|
234
2
|
|
|
235
3
|
Curated concepts for analyzing retirement plans through this MCP server on ProjectionLab 5.
|
|
236
4
|
|
|
@@ -470,21 +238,16 @@ financial terms: https://projectionlab.com/financial-terms
|
|
|
470
238
|
Current Finances through the Plugin API, which has to be enabled in account
|
|
471
239
|
settings. This server uses that same API.
|
|
472
240
|
`;
|
|
473
|
-
export function
|
|
474
|
-
|
|
475
|
-
}
|
|
476
|
-
export function registerKnowledgeResource(server, bridge) {
|
|
477
|
-
registerLayoutResource(server, bridge, {
|
|
478
|
-
name: "knowledge",
|
|
479
|
-
uri: "projectionlab://knowledge",
|
|
241
|
+
export function registerKnowledgeResource(server) {
|
|
242
|
+
server.registerResource("knowledge", "projectionlab://knowledge", {
|
|
480
243
|
title: "ProjectionLab & FIRE Knowledge",
|
|
481
244
|
description: "Curated reference: ProjectionLab data model, FIRE/decumulation concepts, " +
|
|
482
245
|
"retirement tax concepts without yearly figures, an analysis checklist, and an " +
|
|
483
|
-
"index of ProjectionLab help articles
|
|
484
|
-
"connection check has run (ProjectionLab 4 before that; append ?layout=v4 or ?layout=v5 " +
|
|
485
|
-
"to choose). Information and education, not " +
|
|
246
|
+
"index of ProjectionLab help articles. Information and education, not " +
|
|
486
247
|
"personalized financial advice.",
|
|
487
|
-
|
|
488
|
-
})
|
|
248
|
+
mimeType: "text/markdown",
|
|
249
|
+
}, async (uri) => ({
|
|
250
|
+
contents: [{ uri: uri.href, text: KNOWLEDGE, mimeType: "text/markdown" }],
|
|
251
|
+
}));
|
|
489
252
|
}
|
|
490
253
|
//# sourceMappingURL=knowledge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knowledge.js","sourceRoot":"","sources":["../../src/resources/knowledge.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"knowledge.js","sourceRoot":"","sources":["../../src/resources/knowledge.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+OxB,CAAC;AAEF,MAAM,UAAU,yBAAyB,CAAC,MAAiB;IACzD,MAAM,CAAC,gBAAgB,CACrB,WAAW,EACX,2BAA2B,EAC3B;QACE,KAAK,EAAE,gCAAgC;QACvC,WAAW,EACT,2EAA2E;YAC3E,gFAAgF;YAChF,uEAAuE;YACvE,gCAAgC;QAClC,QAAQ,EAAE,eAAe;KAC1B,EACD,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;QACd,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC;KAC1E,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { log } from "../logger.js";
|
|
|
4
4
|
export function registerPlanDataResource(server, bridge) {
|
|
5
5
|
server.registerResource("plan-data", "projectionlab://plan-data", {
|
|
6
6
|
title: "ProjectionLab Plan Data",
|
|
7
|
-
description: "Full export of all ProjectionLab data (plans, current finances, settings, and
|
|
7
|
+
description: "Full export of all ProjectionLab data (plans, current finances, settings, and account history). Refreshed on each access.",
|
|
8
8
|
mimeType: "application/json",
|
|
9
9
|
}, async (uri) => {
|
|
10
10
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planData.js","sourceRoot":"","sources":["../../src/resources/planData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGpC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,MAAM,UAAU,wBAAwB,CACtC,MAAiB,EACjB,MAAc;IAEd,MAAM,CAAC,gBAAgB,CACrB,WAAW,EACX,2BAA2B,EAC3B;QACE,KAAK,EAAE,yBAAyB;QAChC,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"planData.js","sourceRoot":"","sources":["../../src/resources/planData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGpC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,MAAM,UAAU,wBAAwB,CACtC,MAAiB,EACjB,MAAc;IAEd,MAAM,CAAC,gBAAgB,CACrB,WAAW,EACX,2BAA2B,EAC3B;QACE,KAAK,EAAE,yBAAyB;QAChC,WAAW,EACT,2HAA2H;QAC7H,QAAQ,EAAE,kBAAkB;KAC7B,EACD,KAAK,EAAE,GAAG,EAAE,EAAE;QACZ,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,aAAa,CAAC,MAAM,MAAM,CAAC,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;YACxE,OAAO;gBACL,QAAQ,EAAE;oBACR;wBACE,GAAG,EAAE,GAAG,CAAC,IAAI;wBACb,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC;wBAClB,QAAQ,EAAE,kBAAkB;qBAC7B;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,GAAG,CAAC,KAAK,CAAC,oBAAoB,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;YAC7C,OAAO;gBACL,QAAQ,EAAE;oBACR;wBACE,GAAG,EAAE,GAAG,CAAC,IAAI;wBACb,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;4BACnB,KAAK,EAAE,uBAAuB;4BAC9B,6DAA6D;4BAC7D,wCAAwC;4BACxC,OAAO,EAAE,aAAa,CACpB,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CACjD;yBACF,CAAC;wBACF,QAAQ,EAAE,kBAAkB;qBAC7B;iBACF;aACF,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type PlanSettingSection } from "./planSettings.js";
|
|
2
|
+
import { type PlanObj } from "./plans.js";
|
|
3
|
+
import { type RowCondition } from "./settingsReportLayout.js";
|
|
4
|
+
export interface SettingsReportOptions {
|
|
5
|
+
section?: PlanSettingSection;
|
|
6
|
+
/** Two-plan reports only: leave out the rows whose values match. */
|
|
7
|
+
differencesOnly?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The settings of one plan, or of two plans side by side, as a markdown
|
|
11
|
+
* document. Settings are grouped into the topics of REPORT_TOPICS, in its
|
|
12
|
+
* order: main settings first, then more and advanced ones. A setting whose
|
|
13
|
+
* controlling field (the data model's enabledBy, or the topic's own
|
|
14
|
+
* condition) makes it unused in every plan is listed after them under "Not
|
|
15
|
+
* in effect", and stored paths no topic names close the report.
|
|
16
|
+
*/
|
|
17
|
+
export declare function renderSettingsReport(plans: readonly PlanObj[], options?: SettingsReportOptions): string;
|
|
18
|
+
/**
|
|
19
|
+
* The data model's enabledBy as conditions. Three forms are read: `field`
|
|
20
|
+
* (truthy), `field "value"`, and `field false`; anything else yields no
|
|
21
|
+
* condition, so the setting stays where it is.
|
|
22
|
+
*/
|
|
23
|
+
export declare function parseEnabledBy(enabledBy: string | undefined): RowCondition[];
|
|
24
|
+
/** A stored value in the form the app shows it, scaled by its units. */
|
|
25
|
+
export declare function formatValue(value: unknown, units?: string): string;
|