Skip to main content
Glama

Amaltash Investment & Retirement Calculators

Stock Return and DCA Calculator

replay_past_investing
Read-onlyIdempotent

Stock return and dollar-cost averaging (DCA) calculator with an interactive chart. Shows what investing in a US stock or fund would have become, using real past prices, as regular deposits, a lump sum, or both. Use it for what-if-I-had-invested and DCA questions about a ticker such as AAPL or VOO, over the last 120 months or fewer. It covers the past only and gives no estimate of the future. People ask for it as "stock profit calculator", "dollar cost averaging calculator" or "what if i invested".

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "ticker": "<ticker>",
      "amount": "<amount>",
      "months_back": "<months_back>"
    },
    "name": "replay_past_investing"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYesDollars invested each time. Can be 0 if there is a starting amount.
tickerYesA US stock or fund ticker, such as AAPL or SPY.
cadenceNoHow often the amount goes in: day, week or month. Defaults to month.month
months_backYesHow many months before the latest data to begin, from 1 to 120.
starting_amountNoDollars invested once at the start. Defaults to 0.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so the safety profile is covered. The description adds useful behavior beyond that: real historical prices, past-only scope with no future projection, an interactive chart output, and the 120-month ceiling. It says nothing about invalid-ticker handling or data latency, which keeps it off 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.

Conciseness4/5

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

The capability statement is front-loaded and the past-only limitation follows immediately, with no filler sentences. The closing list of user phrasings ('stock profit calculator', 'dollar cost averaging calculator', 'what if i invested') is useful for matching but slightly keyword-like padding.

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 does the work of describing the return: what the investment would have become plus an interactive chart, which is enough to set expectations. Remaining gaps are modest for a read-only calculator with fully documented parameters — mainly how invalid tickers or short history are reported.

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 already defines ticker format, amount bounds, cadence enum, starting_amount and the 1–120 month range. The description's 'regular deposits, a lump sum, or both' loosely frames how amount/cadence/starting_amount combine, but adds no format or edge-case detail beyond the schema, so baseline 3 applies.

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

Purpose5/5

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

The description names a specific verb and resource ('Stock return and dollar-cost averaging (DCA) calculator') and states exactly what it computes: what an investment in a US stock or fund would have become using real past prices. It also scopes itself away from forecasting tools by saying 'It covers the past only and gives no estimate of the future', which separates it from future-value/CAGR-style siblings.

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?

'Use it for what-if-I-had-invested and DCA questions about a ticker such as AAPL or VOO, over the last 120 months or fewer' gives a clear trigger condition and a bound. It does not explicitly name an alternative tool or state when-not to use it beyond the past-only caveat, so it stops short of full routing guidance.

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