Skip to main content
Glama

Compare portfolios side by side

compare_portfolios
Read-onlyIdempotent

Runs the same monthly-investing plan through 2 to 4 portfolios (the same simulation as simulate_portfolio) and returns each one's final outcome range, deepest fall, past return and volatility, and url, for questions like 'S&P 500 or all-country stocks?'.

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
history_toNoLast calendar year of a custom span.
portfoliosYesThe portfolios to compare.
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

A4.2/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, closed-world), so the description's job is to add what they can't: it discloses that results come from the same simulation engine as simulate_portfolio and enumerates the returned fields, which matters because there is no output schema. It doesn't mention cost, latency, or how ties/degenerate portfolios are handled, keeping it short of a 5.

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

Conciseness5/5

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

One sentence, verb-first, with the engine equivalence and the returned fields packed into a single readable clause. No sentence restates the title or the schema, and the example question is placed last where it clarifies rather than delays.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter comparative simulation with no output schema, the description supplies the missing return-shape information and the simulation semantics, which is the main gap that structured fields leave. Currency and inflation effects are deferred entirely to schema descriptions, which is acceptable given 100% coverage.

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 description coverage is 100%, so the schema fully documents parameters including asset tickers, presets, and the history/inflation knobs; baseline is 3. The description adds only the 2–4 portfolio bound (already in minItems/maxItems) and that monthly investing is applied uniformly across candidates.

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

Purpose5/5

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

States a specific verb and resource ('Runs the same monthly-investing plan through 2 to 4 portfolios') and enumerates the outputs (final outcome range, deepest fall, past return, volatility, url). It explicitly anchors itself to a sibling ('the same simulation as simulate_portfolio'), so an agent can place it among the simulate_* family without opening schemas.

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

Usage Guidelines4/5

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

Gives a concrete triggering scenario ('S&P 500 or all-country stocks?') and states the cardinality constraint (2 to 4 portfolios), which implicitly routes single-portfolio questions to simulate_portfolio. It never explicitly says when NOT to use it or names the single-portfolio alternative as the fallback, so the routing is inferable rather than stated.

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