Skip to main content
Glama

fetch_market_data

Retrieve OHLCV market data for cryptocurrency trading pairs and timeframes to support analysis and automated trading decisions.

Instructions

Fetch OHLCV data for a specified trading pair and timeframe.

Parameters: pair (str): Trading pair (e.g., "BTC/USDT"). timeframe (str): Timeframe for the data (e.g., "1h", "5m"). ctx (Context): MCP context object for logging and client access.

Returns: str: Stringified JSON response containing OHLCV data, or None if failed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pairYes
timeframeYes
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It mentions the tool returns stringified JSON or None if failed, which is useful, but lacks details on rate limits, data sources, latency, error handling, or authentication needs. For a data-fetching tool with zero annotation coverage, this is insufficient.

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?

The description is well-structured with clear sections for purpose, parameters, and returns. It's front-loaded with the core purpose. However, the parameter documentation could be more concise by integrating examples inline rather than in a separate list, and some redundancy exists (e.g., 'str' type is obvious from examples).

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?

Given 2 parameters with 0% schema coverage and no output schema, the description does well on parameters but lacks behavioral context. It explains returns but not output structure (e.g., OHLCV format). For a simple data-fetch tool, it's minimally adequate but misses details like data recency or source limitations that would aid the agent.

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 compensate fully. It explicitly lists both parameters (pair and timeframe) with clear examples ('BTC/USDT', '1h', '5m') and explains their purpose, adding significant value beyond the bare schema. The ctx parameter is also documented in the description though not in the schema, covering all expected inputs.

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?

The description clearly states the verb 'fetch' and resource 'OHLCV data', specifying it's for a trading pair and timeframe. It distinguishes from siblings like fetch_balance or fetch_trades by focusing on market data rather than account or trade data. However, it doesn't explicitly contrast with all similar siblings like fetch_backtest_history which might also involve market data.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, when-not-to-use scenarios, or compare with siblings like fetch_backtest_history that might serve overlapping purposes. The agent must infer usage from the purpose alone.

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/worlddebugger/freqtrade-mcp'

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