Skip to main content
Glama

Compare lump sum, monthly and buy-the-dip

smartfin_compare_investment_strategies
Read-onlyIdempotent

Runs one amount through three ways of buying the same US stock or index ETF over a chosen period, on real daily closing prices (adjusted for splits and reinvested dividends): all at once on the first trading day (lump sum), spread evenly on the trading day nearest the 1st of each month, or bought after the price falls a set % from its latest high. Returns each strategy's final value, total and yearly return, worst fall and Sharpe ratio. Use when the user asks which way of investing would have done better for a specific stock or index over a past period, or what an amount would be worth under each approach. Do not use for one strategy only (use smartfin_calculate_investment_return), for several reference periods at once (use smartfin_compare_time_periods), or for future projections. Limits: US-listed S&P 500 companies and major index ETFs only, prices in US dollars, month-level start and end; results depend on the period and are not a prediction.

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>",
      "start_month": "<start_month>"
    },
    "name": "smartfin_compare_investment_strategies"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYesTotal dollars to invest across the whole period
tickerYesStock or ETF symbol, not a company name: AAPL not Apple. Covers 508 symbols: the S&P 500 companies plus the index ETFs SPY, VOO, IVV, QQQ, DIA, IWM, VTI.
end_monthNoLast month to include, YYYY-MM. Omit for the latest available month
start_monthYesFirst month, YYYY-MM, e.g. 2016-01
response_formatNodetailed adds worst fall and Sharpe ratio to the summary. Default concise
dip_threshold_pctNoBuy-the-dip trigger: a fall of this % from the latest high. Default 10
dip_percent_per_buyNoShare of the amount spent on each dip, in %. Default 10

Output Schema

NameRequiredDescriptionDefault
citeYesHow to credit this result
dataYes
nextYesSuggested follow-up calls
linksYes
how_toYesSteps for the user to see or redo this on smartfin.fyi
sourceYes
summaryYesPlain-language result the assistant can quote

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / dip_percent_per_buy / enum
      Previous value: -[
      -  5,
      -  10,
      -  15,
      -  20,
      -  25,
      -  30,
      -  35,
      -  40,
      -  45,
      -  50,
      -  55,
      -  60,
      -  65,
      -  70
      -]New value: +[
      +  5,
      +  10,
      +  15,
      +  20,
      +  25,
      +  30,
      +  35,
      +  40,
      +  45,
      +  50,
      +  55,
      +  60,
      +  65,
      +  70,
      +  75,
      +  80,
      +  85,
      +  90,
      +  95,
      +  100
      +]
  2. Changed1 schema field changed
    • addedOutput schema / properties / links / properties / page
      Added value: +{
      +  "description": "SmartFin's page for this stock, when it has one",
      +  "type": "string"
      +}
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already establish read-only, idempotent, closed-world behavior, and the description adds real substance on top: prices are real daily closes adjusted for splits and reinvested dividends, outputs include final value, total and yearly return, worst fall and Sharpe ratio, and there are hard limits (US-listed S&P 500 plus seven index ETFs only, USD, month-level boundaries). It closes with the honest caveat that results depend on the period and are not a prediction.

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?

Front-loaded with the core action and every sentence carries information — no filler or repetition. It is a single dense block, though, and the strategy definitions and usage exclusions would be easier to scan as separated clauses or bullets.

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

Completeness5/5

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

For a seven-parameter comparison tool with an output schema that documents return values, the description covers everything an agent still needs: what is computed, on what data, under what symbol/date/currency limits, and that results are historical rather than predictive.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3, but the description goes further by explaining the mechanics behind the two strategy-specific parameters: dip_threshold_pct is the fall from the latest high that triggers a buy, and the monthly strategy buys on the trading day nearest the 1st. It doesn't restate amount/ticker/date semantics, which the schema already covers well.

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?

Specific verb (runs one amount through three buying strategies) plus resource (a US stock or index ETF over a chosen period), with each of the three strategies spelled out precisely: lump sum on the first trading day, evenly on the trading day nearest the 1st of each month, and buy-after-a-set-% dip from the latest high. An agent can immediately tell this apart from single-strategy siblings like smartfin_calculate_investment_return.

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

Usage Guidelines5/5

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

Explicitly states when to use ('which way of investing would have done better for a specific stock or index over a past period') and when not to, naming the two alternatives: smartfin_calculate_investment_return for one strategy and smartfin_compare_time_periods for several reference periods. It also excludes future projections, removing the most likely misuse.

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