Skip to main content
Glama
Portfolio Analytics MCP

Portfolio Analytics MCP

by RugSec

get_price_history

Read-only

Retrieve historical adjusted closing prices for one or more tickers, with split and dividend adjustments, date ranges, intervals, and optional base-currency conversion.

Instructions

Get historical adjusted closing prices for one or more tickers.

Prices are adjusted for splits and dividends. Series longer than 400
points are thinned evenly (first and last kept, `thinned: true`); use a
coarser interval for full data. For statistics, prefer
get_performance_stats / analyze_portfolio_risk over computing from this.

Args:
    tickers: Yahoo symbols, e.g. ["AAPL", "ASML.AS", "VWCE.DE"].
    start_date: YYYY-MM-DD. Defaults to 2020-01-01.
    end_date: YYYY-MM-DD (exclusive). Defaults to the latest value.
    interval: "1d", "1wk" or "1mo".
    base_currency: Optional ISO code (e.g. "EUR") to convert all prices
        into with daily FX; default is each listing's own currency.

Returns:
    Per ticker: first/last date, last price, points, `thinned` and
    `prices` by date; or an error dict.

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": {
      "tickers": "<tickers>"
    },
    "name": "get_price_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
tickersYes
end_dateNo
intervalNo1d
start_dateNo2020-01-01
base_currencyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Well beyond the readOnlyHint/openWorldHint annotations, it discloses split/dividend adjustment, a concrete data-loss behavior (series over 400 points are evenly thinned, first/last kept, flagged with `thinned: true`), FX conversion mechanics for base_currency, and that end_date is exclusive. These are exactly the traits an agent needs to avoid silently degraded or misinterpreted data.

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 one-line summary is front-loaded and the Args/Returns blocks are easy to scan; every section carries content. It runs slightly long and reads like a docstring, but there is no filler sentence to cut.

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?

With no output schema, the description compensates by describing the return shape per ticker (first/last date, last price, points, thinned flag, prices by date) and the error-dict fallback. Combined with full parameter documentation, nothing an agent needs to call or interpret this correctly is missing.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries the full burden and does: tickers with real symbol-format examples including exchange suffixes, both date formats and their defaults, the exclusive end_date boundary, the three allowed interval values, and base_currency's ISO format plus the default of per-listing currency. This adds genuine meaning the bare schema lacks.

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 opening sentence names a specific verb and resource ("Get historical adjusted closing prices") plus scope (one or more tickers), which cleanly separates it from get_quote (current price) and get_performance_stats (derived metrics). It also explicitly redirects the sibling use case for statistics, so an agent can route 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?

Explicitly states an alternative path: "For statistics, prefer get_performance_stats / analyze_portfolio_risk over computing from this," and gives actionable advice for the thinning case ("use a coarser interval for full data"). It does not address when to prefer get_quote for recent/single-point prices, leaving one sibling boundary implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.