Skip to main content
Glama
alpacahq

alpaca-mcp-server

Official
by alpacahq

get_option_trades

Retrieve historical trade data for one or more option contracts by date range and symbol, with sorting and pagination for options analysis.

Instructions

Retrieves historical trade data for one or more option contracts.

Input Schema

NameRequiredDescriptionDefault
endNoThe inclusive end of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the current time if the user has a real-time access for the feed, otherwise 15 minutes before the current time.
sortNoSort data in ascending or descending order.
limitNoThe maximum number of data points to return in the response page. The API may return less, even if there are more available data points in the requested interval. Always check the `next_page_token` for more pages. The limit applies to the total number of data points, not per symbol!
startNoThe inclusive start of the interval. Format: RFC-3339 or YYYY-MM-DD. Default: the beginning of the current day, but at least 15 minutes ago if the user doesn't have real-time access for the feed.
symbolsYesA comma-separated list of contract symbols with a limit of 100.
page_tokenNoThe pagination token from which to continue. The value to pass here is returned in specific requests when more data is available, usually because of a response result limit.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.4.0
    • changedInput schema / properties / sort / allOf
      Previous value: -[
      -  {
      -    "default": "asc",
      -    "description": "Sort data in ascending or descending order.",
      -    "enum": [
      -      "asc",
      -      "desc"
      -    ],
      -    "type": "string"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "default": "asc",
      +    "description": "Sort data in ascending or descending order.",
      +    "enum": [
      +      "asc",
      +      "desc"
      +    ],
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / sort / type
      Removed value: -"string"
  2. Changed4 schema fields changedv2.3.2
    • addedInput schema / properties / sort / allOf
      Added value: +[
      +  {
      +    "default": "asc",
      +    "description": "Sort data in ascending or descending order.",
      +    "enum": [
      +      "asc",
      +      "desc"
      +    ],
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / sort / default
      Removed value: -"asc"
    • removedInput schema / properties / sort / enum
      Removed value: -[
      -  "asc",
      -  "desc"
      -]
    • removedInput schema / properties / sort / x-go-name
      Removed value: -"TypeSort"
  3. Addedv2.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden, yet it only says data is 'historical'. It does not disclose the real-time vs. 15-minute-delayed data behavior, pagination via next_page_token, or the per-request limits that materially affect how an agent must call and iterate this tool.

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?

A single clean sentence with zero filler that front-loads the verb and resource. It is efficient, though its brevity reflects under-specification rather than optimal information density.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists and the input schema is fully documented, so return values and parameter formats need not be repeated. However, for a six-parameter, paginated historical-data tool with no annotations, the description omits the operational caveats an agent needs to plan calls correctly.

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 description coverage is 100%, so all six parameters (symbols, start, end, sort, limit, page_token) are already fully documented in the schema. The description adds no parameter meaning beyond that, so the baseline 3 applies.

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: retrieves historical trade data for option contracts. The word 'historical' plus the 'option' qualifier separates it from get_option_latest_trade and from get_stock_trades/get_crypto_trades, but no sibling is named explicitly.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus get_option_latest_trade, get_option_bars, or get_option_quotes, and no mention of prerequisites or constraints. Usage must be inferred entirely from the name and schema.

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