Skip to main content
Glama
schwab-mcp

schwab-mcp

by HGZ-20

Get Historical Price Bars

get_price_history
Read-onlyIdempotent

Fetch historical OHLCV candlestick bars for stocks, ETFs, and indexes by symbol, date range, period, and interval; optionally include extended-hours and previous-close data.

Instructions

Fetch historical OHLCV candlestick price bars for a stock, ETF, or index.

Args: symbol: Ticker symbol (e.g. 'AAPL', 'SPY'). period_type: 'day', 'month', 'year', or 'ytd'. period: Number of periods (day: 1,2,3,4,5,10; month: 1,2,3,6; year: 1,2,3,5,10,15,20; ytd: 1). Omit (set None) if specifying start_date/end_date. frequency_type: 'minute' (for day), 'daily', 'weekly', or 'monthly'. frequency: Candle interval (minute: 1,5,10,15,30; daily/weekly/monthly: 1). start_date: Optional start date ('YYYY-MM-DD', ISO-8601 UTC, or epoch ms). end_date: Optional end date ('YYYY-MM-DD', ISO-8601 UTC, or epoch ms). need_extended_hours: Include pre-market and after-hours candles. need_previous_close: Include previous close metadata. limit: Maximum number of most-recent candles returned (default 120).

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": {
      "symbol": "<symbol>"
    },
    "name": "get_price_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
periodNo
symbolYes
end_dateNo
frequencyNo
start_dateNo
period_typeNoday
frequency_typeNominute
need_extended_hoursNo
need_previous_closeNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, openWorld), so the description's job is to add context and it does: it discloses that limit returns the most-recent candles (truncation behavior), the default of 120, that extended hours means pre-market and after-hours candles, and that previous-close is extra metadata. It does not mention data source, latency, rate limits, or what happens on an invalid symbol.

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?

Front-loaded with a single purpose sentence, then a dense Args block in which each line carries real information given the empty schema descriptions. A little space could be saved (e.g. the default 120 is repeated from the schema), but the docstring format is appropriate for ten parameters with no schema text.

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?

An output schema exists, so return values need not be explained. For a ten-parameter tool at 0% schema coverage, the description covers every parameter, its valid range, and the period/date exclusion rule. What remains missing is routing guidance relative to quote or market-mover siblings and any note on error behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry all ten parameters and it does: allowed values per period_type and frequency_type, the valid integer sets for period and frequency (which the schema only types as bare integers), the acceptable date formats including ISO-8601 and epoch ms, and the conditional rule linking period to start_date/end_date. This is meaning the schema genuinely lacks.

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 a specific verb and resource ('Fetch historical OHLCV candlestick price bars') plus the instrument universe (stock, ETF, index). The word 'historical' implicitly separates it from the quote-returning siblings, but no sibling is named, so differentiation is inferential rather than explicit.

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?

There is one real usage rule: 'Omit (set None) if specifying start_date/end_date', which tells the agent how the two time-selection modes interact. Beyond that there is no guidance on when to pick this over get_quotes or get_market_movers, and no stated preconditions (e.g. symbol must exist).

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