Skip to main content
Glama

Export bars for a backtester

backtest_export
Read-onlyIdempotent

Answers 'give me this stock's bars ready to load into my backtester.' Give a symbol and a framework (backtrader, backtesting_py, vectorbt, zipline, lean, nautilus, freqtrade or qlib); optionally start and end. Returns files (path, encoding, content) plus load_code - write each file at its path, then run load_code. Bars are clipped to as_of; start defaults to 365 days before end. Free keys get the last 12 months; full history with a FinzData plan.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "symbol": "<symbol>"
    },
    "name": "backtest_export"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNo
as_ofNoPoint-in-time cutoff (YYYY-MM-DD). Nothing dated after this is returned, preventing look-ahead bias. Defaults to today (UTC).
startNo
symbolYes
frameworkNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Goes well past the readOnly/idempotent annotations by disclosing the clip-to-as_of rule, the start default (365 days before end), and the entitlement gate (free keys limited to 12 months, full history requires a FinzData plan). It also explains the return payload and the required follow-up action, which is exactly the behavioral context an agent needs.

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?

Dense and front-loaded — purpose, inputs, return contract, then behavioral limits in a logical progression with no filler. The quoted colloquial opener is slightly looser than a plain statement of purpose but does useful routing work.

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 present, the description correctly takes on the return contract (path, encoding, content, load_code) and the entitlement limits. Thin spots remain around file format and column contents, but nothing essential to correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 20%, so the description has to compensate, and it largely does: it enumerates the framework enum values, marks start/end optional, explains as_of clipping and gives the start default. The remaining gap is the start/end date format and end's default, which appear in neither schema nor description.

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?

States a concrete verb and resource (export a symbol's bars) plus the distinguishing purpose — output shaped for a specific backtester framework. The framing 'give me this stock's bars ready to load into my backtester' cleanly separates it from raw-data siblings like get_bars and from execution siblings like run_backtest.

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?

Names the eight supported frameworks and says exactly what the caller must supply (symbol, framework, optionally start/end), plus the post-call procedure: write each returned file at its path, then run load_code. It stops short of explicitly saying when to prefer this over get_bars or run_backtest, so the agent must infer the routing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.