Skip to main content
Glama

MetricDuck — Financial Analysis

Stock Price (Daily)

get_stock_price
Read-only

Use this when the user asks for a share price on a date or a return between two dates: end-of-day closes for US-listed stocks (close as traded, plus split-adjusted adj_close; OHLC and volume may be absent), from a market-data feed, not SEC filings; get_company_overview shows only the latest price; get_metric_history has period-end multiples.

Rows exist ONLY for days with a close: no weekends/holidays, and a thinly traded name can skip open days:

  • Price ON OR AFTER a date (a single date, or an announcement landing on a weekend): pass start_date= alone; the FIRST row of the short forward window is that date or the next day with a close.

  • Price ON OR BEFORE a date: pass end_date=; the LAST row is that date or the prior day with a close.

Use Cases:

  • "AAPL close on 2025-07-28" -> get_stock_price("AAPL", start_date="2025-07-28")

  • "DKNG return 2025-01-02 → 2026-02-27" -> get_stock_price("DKNG", start_date="2025-01-02") + get_stock_price("DKNG", end_date="2026-02-27"), first/last close (cheaper than one 14-month window)

  • "SUI +1/+14/+30 days after an 8-K" -> start_date=, end_date=<announce + ~32d>; pick rows on/after each

  • No dates -> the latest price

When the window spans ≥2 trading days, the response also reports the first/last close and the period return on adj_close (split-adjusted; not a total return), or none when any row lacks adj_close.

Each response also includes the latest REPORTED period-end shares outstanding on/before your end date (period-end balance-sheet count; dei cover where absent) plus the implied market cap at the latest close — use these for market-cap / EV / P/B math instead of deriving share counts from NI/EPS (that yields weighted-average shares, a different basis).

Coverage: US exchange-listed common-equity tickers, end-of-day only (no intraday/real-time, no options/FX). History before 2017 may be sparse or absent. For a CUSTOM multiple (e.g. lease-adjusted EV), get_metric_history's metric_id lists the primitives to price with this tool.

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

Input Schema

NameRequiredDescriptionDefault
limitNoMax rows (newest first if the window exceeds it). Default 30. With start_date alone, the short forward window is returned whole. For a point-to-point return over a long span, make TWO narrow-window calls (one per date) rather than one wide window — cheaper, and avoids the cap dropping your start date. Replies are capped at ~20K chars: when the rows do not fit, raw_data carries the NEWEST rows that do, and a `Next:` call (an earlier end_date) returns the rest.
tickerYesCompany ticker symbol (e.g., 'AAPL'). US exchange-listed (NYSE/Nasdaq/AMEX), 1–5 letters.
end_dateNoWindow end (YYYY-MM-DD). The LAST returned row on/before this date is the price ON OR BEFORE it. Omit start_date to fetch just the price on/before this date.
start_dateNoWindow start (YYYY-MM-DD). Rows exist only for days with a close (no weekends/holidays; a thinly traded name can skip open days) — the FIRST returned row is the price ON OR AFTER this date. Omit end_date to fetch just the price on/after this date.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / start_date / description
      Previous value: -"Window start (YYYY-MM-DD). Markets trade only on business days — if this date is a weekend/holiday the FIRST returned row is the next OPEN day (the price ON OR AFTER this date). Omit end_date to fetch just the price on/after this date."New value: +"Window start (YYYY-MM-DD). Rows exist only for days with a close (no weekends/holidays; a thinly traded name can skip open days) — the FIRST returned row is the price ON OR AFTER this date. Omit end_date to fetch just the price on/after this date."
  2. Changed1 schema field changed
    • changedInput schema / properties / limit / description
      Previous value: -"Max rows (newest first if the window exceeds it). Default 30. With start_date alone, the short forward window is returned whole. For a point-to-point return over a long span, make TWO narrow-window calls (one per date) rather than one wide window — cheaper, and avoids the cap dropping your start date."New value: +"Max rows (newest first if the window exceeds it). Default 30. With start_date alone, the short forward window is returned whole. For a point-to-point return over a long span, make TWO narrow-window calls (one per date) rather than one wide window — cheaper, and avoids the cap dropping your start date. Replies are capped at ~20K chars: when the rows do not fit, raw_data carries the NEWEST rows that do, and a `Next:` call (an earlier end_date) returns the rest."
  3. Changed1 schema field changed
    • changedInput schema / properties / limit / description
      Previous value: -"Max rows (newest first if the window exceeds it). Default 30. For a point-to-point return over a long span, make TWO narrow-window calls (one per date) rather than one wide window — cheaper, and avoids the cap dropping your start date."New value: +"Max rows (newest first if the window exceeds it). Default 30. With start_date alone, the short forward window is returned whole. For a point-to-point return over a long span, make TWO narrow-window calls (one per date) rather than one wide window — cheaper, and avoids the cap dropping your start date."
  4. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations, which only declare read-only, open-world, non-destructive behavior, the description discloses that this is an EOD market-data feed rather than SEC filings, that rows exist only for days with a close, that history before 2017 may be sparse, and that returns use split-adjusted adj_close rather than total return. It also explains the 20K character cap and Next-call behavior, plus the inclusion of period-end shares outstanding and implied market cap.

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 description is front-loaded with the core use case and is organized with clear sections and examples. It is longer than average and repeats some schema-level parameter guidance, but most of the length carries useful operational detail for a complex financial-data tool.

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?

Given the lack of an output schema and the tool's complexity, the description is complete: it explains coverage, date behavior, missing-row semantics, return calculation caveats, extra response fields for market-cap math, and cost/cap considerations. An agent has enough context to select the tool and call it correctly.

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 coverage is 100%, so the baseline is 3; the schema already documents ticker, start_date, end_date, and limit fully. The description still adds operational meaning through first-row/last-row date semantics, weekend-announcement handling, and the recommendation to make two narrow calls instead of one wide window for point-to-point returns, though some of this overlaps with the schema descriptions.

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 states a specific verb and resource: retrieving end-of-day stock prices and returns between dates for US-listed tickers. It explicitly distinguishes this tool from get_company_overview, which shows only the latest price, and get_metric_history, which handles period-end multiples and custom metric primitives.

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?

It gives explicit when-to-use guidance, including share price on a date, return between dates, announcement-relative windows, and the no-dates latest-price case. It names alternatives and exclusions: no intraday/real-time, no options/FX, not SEC filings, and specific sibling tools for other use cases.

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