Skip to main content
Glama

Simulate spending down a portfolio in retirement

simulate_withdrawal
Read-onlyIdempotent

Monte Carlo simulation of withdrawing a yearly percentage of a starting balance, raised with inflation every month, from a portfolio (the 4% rule and its variants). Returns the share of paths that still had money at the end, when the others ran out, the remaining balance range in today's money, the success rate at withdrawal rates from 2% to 8%, and a compoundsim.app url.

Input Schema

NameRequiredDescriptionDefault
yearsNoYears the money has to last.
balanceYesStarting balance.
historyNoThe span of past monthly returns the model is fitted to: the last 5, 10 or 20 years, or all the data. An asset with less data than the span asked for uses all of its own.all
currencyNoCurrency of every amount, in and out. In a currency other than USD the paths carry its exchange-rate swings against the dollar (trend removed). Defaults to the language's currency.
languageNoLanguage of the page the returned url opens; match the user's language.en
portfolioYesA preset name or weights in percent by asset (any total; they are scaled to 100). Assets: sp500 = S&P 500, ndx100 = Nasdaq 100, sox = SOX (Semiconductors), schd = US dividend stocks (SCHD), acwi = MSCI ACWI, efa = Developed ex-US stocks, eem = Emerging market stocks, vnq = US REITs, gld = Gold, shy = US 1–3 year Treasuries, agg = US aggregate bonds, tlt = US long-term Treasuries, btc = Bitcoin. Presets: sixtyForty = sp500 60% + agg 40%; allCountry = acwi 100%; allWeather = sp500 30% + tlt 40% + shy 15% + gld 15%.
history_toNoLast calendar year of a custom span.
history_fromNoFirst calendar year of a custom span (with history_to); replaces history.
inflation_percentNoAnnual inflation the withdrawals rise with; balances are in today's money.
withdrawal_rate_pctNoFirst year's withdrawal as a percentage of the starting balance.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, closed-world), and the description goes further by enumerating exactly what comes back — success share, exhaustion timing, balance range in today's money, a 2%-8% rate sweep — which is real added context. It stops short of noting simulation cost/runtime or how many paths are run.

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

Conciseness4/5

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

The core action is front-loaded in the first clause and the return listing follows in one sentence with no filler. The output enumeration is long but each item is a distinct return value an agent would want.

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?

With 10 parameters and no output schema, the description carries the burden of describing returns and does so thoroughly, so an agent knows what to expect. Remaining gaps — simulation size, runtime, determinism beyond idempotentHint — are minor for a read-only calculation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so every parameter is already documented. The description adds only framing, that the withdrawal rises with inflation monthly and results are in today's money, which sharpens withdrawal_rate_pct and inflation_percent but does not explain the history window or portfolio presets beyond the schema.

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

Purpose4/5

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

States a specific verb and resource (Monte Carlo simulation of withdrawing a yearly percentage from a portfolio) plus the method and the 4% rule framing, which clearly separates it from a growth-only or fixed-rate simulation. It never names the sibling tools, so the differentiation is inferable rather than explicit.

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

Usage Guidelines3/5

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

The retirement drawdown scenario is implied by the title and by the 'yearly percentage of a starting balance, raised with inflation' mechanic, so an agent can infer when to pick this over simulate_fixed_rate. But there is no explicit when-to-use statement, no exclusions, and no mention of the alternatives.

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