Skip to main content
Glama
pineforge-4pass

PineForge-Codegen

fetch_binance_ohlcv

Fetch Binance OHLCV candles and write a backtest-ready CSV, supporting spot and perpetual futures with automatic pagination.

Instructions

Fetch OHLCV candles from Binance public API and write a backtest-ready CSV (header: timestamp,open,high,low,close,volume; timestamp = open time in UNIX ms UTC). Supports spot and usdt_perp (USDT-margined perpetual futures). Requests larger than 1000 bars are paginated automatically. The output path must live inside the MCP cwd unless PINEFORGE_ALLOW_ANYWHERE=1.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesBinance symbol, e.g. 'BTCUSDT'. Use binance_symbols to validate.
intervalYesKline interval. Spot supports 1s + 1m..1M; usdt_perp supports 1m..1M (no 1s).
marketNo'spot' (default) or 'usdt_perp'.
limitNoTotal bars to fetch. Default 1000. Paginated above 1000.
start_timeNoUNIX ms UTC. If unset, derived from end_time/now and limit.
end_timeNoUNIX ms UTC. Defaults to now.
output_pathYesPath to write the CSV (will create parent dirs as needed).
Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: pagination for >1000 bars, output path restrictions (cwd unless env var set), and exact CSV format, including timestamp interpretation.

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 concise (~150 words) and front-loaded with the core purpose. Each sentence adds value, covering format, pagination, path constraint, and market-specific interval support without redundancy.

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 7 parameters (3 required), schema coverage, and no output schema, the description provides complete context: it specifies the CSV output format, pagination, path constraints, and interval restrictions, making the tool self-contained.

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 schema has 100% coverage, and the description adds extra context beyond schema descriptions, such as defaults for limit/start_time/end_time, interval restrictions per market, and the hint to use 'binance_symbols' for symbol validation.

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 specifies the verb 'Fetch' and the resource 'OHLCV candles from Binance public API', and details the output format and market types. It distinguishes itself from siblings like 'binance_symbols' by focusing on data retrieval rather than symbol validation.

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 implicitly guides usage by stating it fetches data for backtesting and suggests using 'binance_symbols' for symbol validation. It does not explicitly list alternatives or when-not-to-use, but the context is clear enough for the agent.

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/pineforge-4pass/pineforge-codegen-mcp'

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