Skip to main content
Glama
bartest5

Alpaca MCP Server

by bartest5

Get Crypto Bars

get_crypto_bars
Read-only

Fetch historical OHLCV bars for crypto pairs, supporting multiple timeframes, custom date ranges, and lookback periods for market analysis.

Instructions

Retrieve historical price bars (OHLCV) for one or more cryptocurrencies.

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

Args: symbols: Comma-separated crypto pairs (e.g. "BTC/USD" or "BTC/USD,ETH/USD"). timeframe: Bar aggregation period — "1Min", "5Min", "15Min", "30Min", "1Hour", "1Day", "1Week", or "1Month". 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 1). hours: Additional hours in the lookback (default 0). minutes: Additional minutes in the lookback (default 0). limit: Max total data points returned across all symbols, 1–10000 (default 1000). sort: Timestamp sort order — "asc" (default) or "desc".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNo
daysNo
sortNoasc
hoursNo
limitNo
startNo
minutesNo
symbolsYes
timeframeNo1Hour

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, lowering the bar. The description adds valuable behavioral details: automatic lookback calculation when start is omitted, limit semantics ('Max total data points returned across all symbols'), and sort order. It doesn't mention pagination, but for a read-only historical data tool, this is sufficient context beyond the annotations.

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 well-structured: a one-sentence purpose followed by a labeled Args block. Every parameter earns its place, and the text avoids redundancy. It is longer than minimal, but the parameter count (9) justifies the detail. The content is front-loaded with the main verb and resource.

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 tool's complexity (9 parameters, 1 required), the description covers all parameters, defaults, lookback logic, and sort/limit behaviors. The output schema exists, so return value details aren't needed in the description. This is complete for an agent to select and invoke correctly.

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 carries the full burden, and it excels. The Args section explains each parameter's meaning, defaults, formats, and special behaviors—e.g., 'Inclusive start time', 'Max total data points across all symbols', 'Additional hours in the lookback'. This far exceeds the raw schema, making parameter semantics exceptionally clear.

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 opens with a specific verb+resource: 'Retrieve historical price bars (OHLCV) for one or more cryptocurrencies.' This clearly distinguishes it from sibling tools like get_stock_bars and get_option_bars by explicitly naming crypto, and from get_crypto_latest_bar by indicating historical data. The purpose is unambiguous.

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

Usage Guidelines4/5

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

The description gives clear context for when to use the tool (for crypto OHLCV data) and explains behavior for omitted start/end, but it does not explicitly name alternative tools or exclusions. The sibling tool list shows many bar/quote/trade tools, but the description itself doesn't state 'use this instead of get_stock_bars for crypto.' Thus it earns a 4 for clear context without explicit alternatives.

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