Skip to content

KB / mcp

MCP tool: get_quote

Last verified

get_quote returns last-price, bid, ask, volume, and daily change for one or more tickers. It dispatches to GET /api/v1/trading/quote/{symbol} for a single symbol or GET /api/v1/trading/quotes for a batch — the same routes Schwab-backed trading uses, with yfinance as the silent fallback when Schwab returns nothing.

Signature

get_quote(
  symbols: str   # comma-separated tickers, e.g. "SPY" or "SPY,QQQ,AAPL". Max 10.
) -> str         # JSON-serialised dict or list

Parsing rules (mcp/mcp_server/tools/public.py:get_quote):

Returns

Single symbol

{
  "symbol": "SPY",
  "last": 538.20,
  "bid": 538.18,
  "ask": 538.22,
  "volume": 41_283_400,
  "change": 2.15,
  "change_pct": 0.40,
  "as_of": "2026-05-26T10:14:33-04:00",
  "source": "schwab"
}

Batch (2+ symbols)

{
  "quotes": {
    "SPY":  { "last": 538.20, "bid": 538.18, "ask": 538.22, ... },
    "QQQ":  { "last": 471.05, "bid": 471.02, "ask": 471.08, ... },
    "AAPL": { "last": 215.40, "bid": 215.37, "ask": 215.43, ... }
  },
  "as_of": "2026-05-26T10:14:33-04:00"
}

as_of is ET ISO 8601 with offset (Law 1). source is one of schwab / yfinance so an agent can see which provider answered.

Behaviour

Examples

Single quote

Operator: "What's SPY trading at?"
Agent: get_quote(symbols="SPY")

Multi-symbol compare

Operator: "Compare AAPL, MSFT, and GOOGL right now."
Agent: get_quote(symbols="AAPL,MSFT,GOOGL")

Returns the batch shape so the agent can read prices side-by-side in one round-trip.

Pre-trade price check

Agent: get_quote(symbols="SPY")
  -> last 538.20, change +0.40%
Agent: plan_trade(symbol="SPY", side="buy", quantity=10)

When to use

When NOT to use

See also