Skip to main content
Glama

Simulate monthly investing in a portfolio

simulate_portfolio
Read-onlyIdempotent

Monte Carlo simulation of investing monthly (plus an optional starting sum) in one asset or a mix rebalanced monthly. Returns the range of outcomes by year (10th to 90th percentile), the deepest fall along the way, the mix's own past return and volatility, and a compoundsim.app url that shows the same scenario.

Input Schema

NameRequiredDescriptionDefault
yearsNoYears of investing.
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
initialNoStarting sum invested at once.
monthlyYesAmount invested at the end of every month.
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. When given, every amount out is in today's money at this rate; omitted, amounts are nominal.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint=false, so the safety profile is covered. The description does add useful output-behavior context (percentile band by year, deepest drawdown, the mix's historical return/volatility, and a compoundsim.app link reproducing the scenario), but says nothing about cost, expected runtime, or whether the simulation is stochastic/non-deterministic between calls — a notable omission for a Monte Carlo tool.

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?

A single sentence, front-loaded with the method and scenario, then the return payload, then the link. It is long but every clause carries information; only the URL clause is arguably optional.

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 no output schema, the description correctly takes on the burden of describing returns (percentiles by year, max drawdown, historical stats, shareable URL), which is exactly what an agent needs to report results. It omits assumptions that matter for interpretation, such as how non-USD currency paths are modeled, though the schema covers that in the currency field.

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% and every parameter carries a detailed description (asset ticker meanings, preset compositions, history spans, inflation semantics), so the schema does the heavy lifting. The prose only echoes the optional starting sum and the asset-vs-mix choice, adding no syntax or constraint detail beyond the schema; baseline 3 applies.

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 method (Monte Carlo simulation) applied to a specific resource (monthly investing in one asset or a monthly-rebalanced mix), including the optional lump sum. It does not explicitly name or distinguish itself from siblings like compare_portfolios or simulate_withdrawal, but the monthly-accumulation framing is distinctive enough to separate it from a fixed-rate or withdrawal simulation.

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 description implies the scenario (accumulating via monthly contributions, with or without a starting sum) but gives no explicit when-to-use / when-not-to-use guidance and never names an alternative. An agent must infer that compare_portfolios is the choice for comparing multiple mixes rather than simulating one.

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