Skip to main content
Glama
alpacahq

alpaca-mcp-server

Official
by alpacahq

Get Stock Quotes

get_stock_quotes
Read-only

Retrieve historical Level 1 bid/ask quotes for one or more stocks, with configurable time ranges and lookback periods.

Instructions

Retrieve historical bid/ask quotes (level 1) for one or more stocks.

When start is omitted, it is automatically computed as now minus the days/hours/minutes lookback.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNoInclusive end time (RFC 3339). Omit for current time.
asofNoAs-of date (YYYY-MM-DD) for point-in-time symbol mapping.
daysNoDays to look back when start is omitted (default 0).
feedNoData feed — "sip" (all US exchanges, default, paid), "iex" (free tier), "otc", or "boats". Paper/free accounts must set feed="iex" to avoid 403 errors.
sortNoTimestamp sort order — "asc" (default) or "desc".asc
hoursNoAdditional hours in the lookback (default 0).
limitNoMax total data points returned across all symbols, 1–10000 (default 1000).
startNoInclusive start time (RFC 3339). Omit to use relative lookback.
minutesNoAdditional minutes in the lookback (default 20).
symbolsYesComma-separated tickers (e.g. "AAPL" or "AAPL,MSFT").
currencyNoPrice currency (ISO 4217). Default USD.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changedv2.3.2
    • addedInput schema / properties / asof / description
      Added value: +"As-of date (YYYY-MM-DD) for point-in-time symbol mapping."
    • addedInput schema / properties / currency / description
      Added value: +"Price currency (ISO 4217). Default USD."
    • addedInput schema / properties / days / description
      Added value: +"Days to look back when start is omitted (default 0)."
    • addedInput schema / properties / end / description
      Added value: +"Inclusive end time (RFC 3339). Omit for current time."
    • addedInput schema / properties / feed / description
      Added value: +"Data feed — \"sip\" (all US exchanges, default, paid),\n  \"iex\" (free tier), \"otc\", or \"boats\".\n  Paper/free accounts must set feed=\"iex\" to avoid 403 errors."
    • addedInput schema / properties / hours / description
      Added value: +"Additional hours in the lookback (default 0)."
    • addedInput schema / properties / limit / description
      Added value: +"Max total data points returned across all symbols,\n   1–10000 (default 1000)."
    • addedInput schema / properties / minutes / description
      Added value: +"Additional minutes in the lookback (default 20)."
    • addedInput schema / properties / sort / description
      Added value: +"Timestamp sort order — \"asc\" (default) or \"desc\"."
    • addedInput schema / properties / start / description
      Added value: +"Inclusive start time (RFC 3339). Omit to use relative lookback."
    • addedInput schema / properties / symbols / description
      Added value: +"Comma-separated tickers (e.g. \"AAPL\" or \"AAPL,MSFT\")."
  2. Addedv2.0.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already mark the tool readOnly and openWorld, so the description is not burdened with safety. It adds a valuable behavioral detail: when start is omitted, the tool computes it from days/hours/minutes lookback. It does not discuss pagination or data coverage, but the output schema covers return shape.

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 sentences, no filler, and the main purpose is front-loaded. The behavioral caveat is in a separate sentence, making it easy to scan.

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 an 11-parameter tool, the description relies appropriately on the rich schema and output schema. It covers the one non-obvious default (start auto-computation). It could optionally mention feed restrictions or examples, but these are documented in the schema, so the agent is not left without critical information.

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%, so the schema fully documents all 11 parameters. The description's note about start being computed from lookback restates and slightly clarifies the schema's 'Omit to use relative lookback', but adds no new parameter-level meaning.

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 ('Retrieve'), resource ('historical bid/ask quotes (level 1)'), and scope ('one or more stocks'), which clearly distinguishes it from sibling tools like get_stock_latest_quote (latest) and get_stock_bars (OHLCV).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context through 'historical' and 'level 1' but does not explicitly name alternatives or state when not to use this tool. There is no direct routing to siblings such as get_stock_latest_quote or get_stock_bars, leaving selection to inference.

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

Deploy Server

Other Tools