Skip to main content
Glama
bartest5

Alpaca MCP Server

by bartest5

Get Stock Trades

get_stock_trades
Read-only

Retrieve historical trade data for one or more stocks. Set time ranges or relative lookback to get the trades you need.

Instructions

Retrieve historical trade data for one or more stocks.

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

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNo
asofNo
daysNo
feedNo
sortNoasc
hoursNo
limitNo
startNo
minutesNo
symbolsYes
currencyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

The description goes beyond annotations by explaining the automatic start-time computation from days/hours/minutes, the feed-specific behavior (e.g., paper/free accounts requiring 'iex' to avoid 403 errors), and the asof parameter for point-in-time symbol mapping. This adds substantial behavioral context.

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?

The description is appropriately sized for 11 parameters, clearly structured with an intro sentence and an Args list. Each parameter line is concise and informative, with no irrelevant content.

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?

Given the high parameter count and absent schema descriptions, the description provides complete context for all inputs, including default behavior and edge cases. The presence of an output schema means return values need not be described, making this description sufficient.

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?

The input schema has 0% parameter descriptions, so the description carries the full burden. It explains every parameter comprehensively, including defaults, formats, and special constraints for feed and asof. This fully compensates for the missing schema descriptions.

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 clearly states 'Retrieve historical trade data for one or more stocks' with a specific verb and resource. It distinguishes itself from siblings like get_stock_bars, get_stock_quotes, and get_stock_latest_trade by specifying 'trade data' and 'historical'.

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 when to use the tool (for historical trade data) but does not explicitly name alternatives or state when not to use it. It provides context about optional parameters and feed restrictions, but lacks direct comparison with siblings.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bartest5/alpacahq_alpaca-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server