Skip to main content
Glama
jasonwu001t

marketlens-mcp

by jasonwu001t

Crypto bars

crypto_bars
Read-onlyIdempotent

Fetch historical OHLCV bars for crypto pairs to analyze price and volume over time, with configurable timeframe and window. Large results return a result_id for later SQL queries.

Instructions

Historical OHLCV bars for crypto pairs (prices in the quote currency, volume in base units), one row per pair and bar start (UTC). timeframe default 1h; window by start/end or lookback (default P1D). Large results are stored, not shown: you get a result_id to query with results_query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNoWindow end (same format). Default: now (Alpaca's latest available).
sortNoTime order of the rows: asc (oldest first, default) or desc (newest first).asc
startNoWindow start: ISO date (00:00 UTC) or datetime with a zone, e.g. 2026-01-02T14:30:00Z.
tickersYesCrypto pairs as BASE/QUOTE, e.g. ["BTC/USD"] (1-200).
lookbackNoWindow length back from end as an ISO-8601 duration (P5D, P1Y, PT20M); only when start is omitted. Default P1D.
timeframeNoBar size: Nmin (1-59), Nh (1-23), 1d, 1w or Nmo (1,2,3,4,6,12).1h
page_tokenNoContinue a truncated fetch: the page_token from the previous response's pagination.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover read-only/idempotent/non-destructive, but the description adds meaning beyond them: pricing in quote currency, volume in base units, UTC bar starts, and the out-of-band result storage with a result_id. That storage/pagination behavior is the kind of trait annotations cannot express.

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?

Three tightly packed sentences that front-load what the tool returns before touching defaults and the result storage behavior. No filler, though the timeframe/lookback defaults slightly duplicate schema content.

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?

With no output schema, the description carries the return-shape burden and does so reasonably (OHLCV, one row per pair/bar start, units, stored large results via results_query). A brief note on the pagination/no-output-schema contract would make it airtight.

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 every parameter is already documented, including defaults and the lookback-only-when-start-omitted rule. The description restates timeframe/lookback defaults rather than adding syntax or constraints beyond the schema; the baseline 3 applies. Unit semantics it does add are output-oriented, not parameter-level.

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+resource ('Historical OHLCV bars for crypto pairs') and adds scope detail (one row per pair and bar start, UTC). The 'Historical' qualifier implicitly separates it from the crypto_latest_bars sibling, 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 Guidelines4/5

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

Gives clear operational context: window by start/end or lookback (default P1D), timeframe default 1h, and the crucial routing note that large results are stored and retrieved via results_query with a result_id. No explicit when-not-to-use or named alternative (e.g. crypto_latest_bars for the current bar), so it stops short of a 5.

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