Skip to main content
Glama

Price returns and drawdowns

price_returns
Read-onlyIdempotent

Return a company's price return, total return and maximum drawdown over standard windows (1m, 3m, 6m, ytd, 1y, 3y, 5y, max), computed by us from end-of-day bars built from trades at IEX only and from the splits and dividends in the company's SEC filings. Each value lists the bars and filing facts it used. Prices are end of day, published the day after the session: not real time, not the consolidated tape, not the official close. A window that starts before our first session is null. Use it when asked how a stock has performed or how far it fell from a peak.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "company": "ticker:AAPL",
      "windows": "ytd,1y"
    },
    "name": "price_returns"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoLast session to use; default the newest (YYYY-MM-DD).
as_ofNoKnowledge date or timestamp (YYYY-MM-DD or RFC 3339). The answer is what FinancialMD knew at that instant: only facts whose known interval contains as_of. Omit for the current view.
tickerNoOne listing of the company; default the primary listing.
companyYesCompany identifier: a FinancialMD id ("fmd_01H..."), an SEC CIK ("cik:320193"), or a ticker ("ticker:AAPL", optionally with the MIC "ticker:AAPL.XNAS"). A bare ticker like "AAPL" is accepted and sent as ticker:AAPL. An issuer on an EU or UK regulated market that does not file with the SEC has no CIK: pass its LEI ("lei:IOG4E947OATN0KJYSD45") or its fmd_ id.
windowsNoComma-separated windows from 1m, 3m, 6m, ytd, 1y, 3y, 5y, max; default all.

Output Schema

NameRequiredDescriptionDefault
dataNo{ listing, range, windows: [{ window, start, end, sessions, price_return, total_return, annualised_total_return, max_drawdown, drawdown { peak, trough } }], source { venue, consolidated, delay }, generated_by, method_version, note }
metaNoRequest metadata: request_id, as_of, company resolution, coverage, pipeline_version, licence, terms, proof_base.
errorNoPresent only on isError results: the API error code and message plus remedy hints.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds substantive behavior beyond them: the data is end-of-day and published a day later, is not real time, not the consolidated tape, and not the official close. It also discloses that each value carries its supporting bars and filing facts and that a window starting before the first session returns null — exactly the caveats an agent needs to avoid over-claiming precision.

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?

What is returned and its provenance come first, then the data-quality caveats, then the usage trigger — good front-loading with no filler. The triple negation ("not real time, not the consolidated tape, not the official close") is slightly redundant but each clause carries a distinct warning.

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 read-only metric tool with a full output schema and full parameter coverage, the description covers provenance, latency, and null behavior, which are the failure modes an agent would otherwise misreport. Minor gaps remain, such as how ticker and company interact when both are supplied, but nothing essential for correct invocation is missing.

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 coverage is 100% and every parameter (company, ticker, to, as_of, windows) is already documented in the schema, including defaults. The description only restates the window set and adds the null-before-first-session rule, which is semantics rather than parameter detail. Baseline 3 applies when the schema does the heavy lifting.

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

Purpose4/5

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

States specific verbs and resources: price return, total return, and maximum drawdown over eight named windows, plus the exact data provenance (IEX-only EOD bars, SEC splits and dividends). An agent knows precisely what comes back. It does not explicitly contrast itself with siblings such as dividends or financials_as_reported, so it stops short of a 5.

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 when asked how a stock has performed or how far it fell from a peak" gives a clear positive trigger. There is no when-not guidance and no named alternative for related questions (e.g. dividend history), leaving some inference to the agent.

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