Skip to main content
Glama

run_backtest

Backtest a Moving Average Crossover trading strategy with customizable parameters and optional visualization of equity curves.

Instructions

Backtests a Moving Average Crossover strategy.

Args:
    symbol: Ticker symbol
    fast_ma: Fast moving average period
    slow_ma: Slow moving average period  
    start_date: Backtest start date
    end_date: Backtest end date
    visualize: If True, returns equity curve chart

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes
fast_maYes
slow_maYes
start_dateNo2020-01-01
end_dateNo2023-12-31
visualizeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Backtests' implies a computational operation, it doesn't describe what the tool actually returns (though an output schema exists), whether it's resource-intensive, if it requires market data access, or what happens when parameters are invalid. The description lacks behavioral context beyond the basic action.

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 perfectly structured and concise. The first sentence states the purpose clearly, followed by a well-organized parameter list with brief explanations. Every sentence earns its place, and there's no redundant or unnecessary information.

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?

Given that an output schema exists (so return values are documented elsewhere), the description provides adequate context for a backtesting tool. It covers the strategy type and all parameters with semantic meaning. The main gap is lack of behavioral context about what the backtest actually computes and returns, but the output schema mitigates this concern.

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?

With 0% schema description coverage, the description provides meaningful semantic information for all 6 parameters. It explains what each parameter represents (ticker symbol, moving average periods, date ranges, visualization flag), which compensates for the lack of schema descriptions. The only minor gap is not specifying date formats or valid ranges for the moving average periods.

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 states the specific action ('Backtests') and the specific strategy ('Moving Average Crossover strategy'), which distinguishes it from other financial/trading tools like 'monte_carlo_simulation' or 'walk_forward_analysis'. It provides a verb+resource combination that is precise and unambiguous.

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 sibling tools like 'walk_forward_analysis' for different backtesting approaches or 'compute_indicators' for calculating moving averages without backtesting. There's no context about prerequisites or typical use cases.

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/N-lia/MonteWalk'

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