Skip to main content
Glama

Compare stocks or ETFs

compare_securities
Read-onlyIdempotent

Use this when the user wants to compare 2 to 5 US stocks or ETFs side by side (e.g. "VOO vs QQQ", "SCHD or VYM?"): returns, drawdown, volatility, Sharpe, beta, dividend yield and how correlated they are, with an overlaid 1Y/5Y chart. End-of-day data for US large and mid caps, major foreign stocks and US ETFs. Not for intraday quotes or recommendations on what to buy.

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": "compare_securities"
  }
}

Input Schema

NameRequiredDescriptionDefault
tickersYesTickers to compare, in the order the user named them

Output Schema

NameRequiredDescriptionDefault
urlYesRedstone compare page (pairs only)
asOfYesMarket date (YYYY-MM-DD) of the latest close behind every number
securitiesYes
correlationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedOutput schema / properties / securities / items / properties / dividendYieldPct
      Added value: +{
      +  "description": "Trailing 12-month dividend yield: dividends that went ex in the past year over the latest close. 0 pays none; null when unknown (paid in another currency)",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • changedOutput schema / properties / securities / items / properties / statsSince / description
      Previous value: -"YYYY-MM-DD, set only when there is less than a year of history: the 1Y figures (return, drawdown, Sharpe, Sortino, beta, alpha) then run from this first close, and so does the YTD return if it falls this year. Screens on those metrics leave such securities out"New value: +"YYYY-MM-DD, set only when there is less than a year of history: the 1Y figures (return, drawdown, volatility, Sharpe, Sortino, beta, alpha, yield) then run from this first close, and so does the YTD return if it falls this year. Screens on those metrics leave such securities out"
    • addedOutput schema / properties / securities / items / properties / volatility1yPct
      Added value: +{
      +  "description": "Annualized standard deviation of daily returns over the past year",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • changedOutput schema / properties / securities / items / required
      Previous value: -[
      -  "return1dPct",
      -  "returnYtdPct",
      -  "return1yPct",
      -  "return5yAnnualizedPct",
      -  "maxDrawdown1yPct",
      -  "sharpe1y",
      -  "sortino1y",
      -  "beta1y",
      -  "alpha1yPct",
      -  "statsSince",
      -  "ticker",
      -  "name",
      -  "type",
      -  "sector",
      -  "price",
      -  "url"
      -]New value: +[
      +  "return1dPct",
      +  "returnYtdPct",
      +  "return1yPct",
      +  "return5yAnnualizedPct",
      +  "maxDrawdown1yPct",
      +  "sharpe1y",
      +  "sortino1y",
      +  "beta1y",
      +  "alpha1yPct",
      +  "volatility1yPct",
      +  "dividendYieldPct",
      +  "statsSince",
      +  "ticker",
      +  "name",
      +  "type",
      +  "sector",
      +  "price",
      +  "url"
      +]
  2. Changed2 schema fields changed
    • addedOutput schema / properties / securities / items / properties / statsSince
      Added value: +{
      +  "description": "YYYY-MM-DD, set only when there is less than a year of history: the 1Y figures (return, drawdown, Sharpe, Sortino, beta, alpha) then run from this first close, and so does the YTD return if it falls this year. Screens on those metrics leave such securities out",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • changedOutput schema / properties / securities / items / required
      Previous value: -[
      -  "return1dPct",
      -  "returnYtdPct",
      -  "return1yPct",
      -  "return5yAnnualizedPct",
      -  "maxDrawdown1yPct",
      -  "sharpe1y",
      -  "sortino1y",
      -  "beta1y",
      -  "alpha1yPct",
      -  "ticker",
      -  "name",
      -  "type",
      -  "sector",
      -  "price",
      -  "url"
      -]New value: +[
      +  "return1dPct",
      +  "returnYtdPct",
      +  "return1yPct",
      +  "return5yAnnualizedPct",
      +  "maxDrawdown1yPct",
      +  "sharpe1y",
      +  "sortino1y",
      +  "beta1y",
      +  "alpha1yPct",
      +  "statsSince",
      +  "ticker",
      +  "name",
      +  "type",
      +  "sector",
      +  "price",
      +  "url"
      +]
  3. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), so the description adds real value by disclosing data freshness ('end-of-day data') and the supported universe (US large/mid caps, major foreign stocks, US ETFs). It doesn't mention latency, rate limits, or what happens with an unknown ticker, which keeps it short of 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.

Conciseness5/5

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

Two dense sentences: the trigger plus examples come first, coverage and exclusions after. Every clause carries information an agent would otherwise have to guess, and nothing is repeated from structured fields except the unavoidable ticker count.

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 an output schema present, the description needn't explain return shape; it instead supplies the universe, freshness, and chart timeframes an agent needs to decide eligibility. Nothing required to call this correctly 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 the description only restates the schema's own constraints (2 to 5 tickers, US symbols). No extra meaning is added about ordering, casing, or how invalid or non-US tickers are handled, so this sits at the baseline.

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?

States a specific verb and resource ('compare 2 to 5 US stocks or ETFs side by side') and enumerates the exact outputs (returns, drawdown, volatility, Sharpe, beta, dividend yield, correlation, overlaid chart). The concrete examples ('VOO vs QQQ', 'SCHD or VYM?') make it instantly distinguishable from get_security_metrics and screen_securities.

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?

Opens with an explicit trigger ('Use this when the user wants to compare...') and closes with explicit exclusions ('Not for intraday quotes or recommendations on what to buy'). Both the when and the when-not are stated, so no inference is needed.

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