Skip to main content
Glama

sandbox_backtest

Run a sandbox backtest of strategy code without persisting anything.

This is the fastest way to test a strategy. The code is run through
static checks and a full backtest on historical data, but no Strategy
or StrategyVersion rows are created. Use this for rapid iteration.

Args:
    code: Python source code implementing the Strategy contract.
          Must define a METADATA dict and a class extending Strategy
          with an on_bar(ctx) -> Signal method. See CREATOR_API.md.
    domain: Trading domain (e.g. "eth_usdc", "btc_usdc", "sol_usdc").
    symbol: Price symbol for historical data (e.g. "ETHUSDT").
    user_id: Identifier for trial tracking (used for DSR correction).

Returns JSON with: success, metrics (sharpe, sortino, win_rate,
total_trades, return_bps, max_drawdown, regime_breakdown,
exit_reason_breakdown), or error details if validation failed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
domainNoeth_usdc
symbolNoETHUSDT
user_idNomcp_sandbox

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full disclosure burden and does so well. It states the code is run through static checks and a full historical backtest, that nothing is persisted, and that no Strategy or StrategyVersion rows are created. It also describes the JSON return shape including success, metrics, and error details, giving the agent a solid model of behavior.

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 well-structured and front-loaded with the key behavioral distinction: sandbox, no persistence, fastest path. The Args and Returns sections are compact and every sentence adds value. There is no filler or repetition of the tool name.

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 tool's moderate complexity, an output schema exists, and 4 parameters are documented directly in the description, this is complete. The agent knows the required input shape, the strategy contract constraints, the defaults, the lack of side effects, and the return structure. Nothing essential is missing for correct invocation.

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, and it does thoroughly. Every parameter is explained with types, examples, and constraints: code must define METADATA and extend Strategy with on_bar, domain and symbol get concrete examples, and user_id's purpose is disclosed. It even references CREATOR_API.md for the full contract.

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 opens with a specific verb and resource: 'Run a sandbox backtest of strategy code without persisting anything.' It distinguishes the tool from submit_strategy and similar persistence-heavy siblings by explicitly stating no Strategy or StrategyVersion rows are created. This leaves no ambiguity about what the tool does.

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 clearly says this is the fastest way to test a strategy and should be used for rapid iteration. It implies but never explicitly names the alternative for when persistence is desired, such as submit_strategy. The guidance is clear on context but not exhaustive on when-not-to-use.

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.

TDQS

A3.8/5.0
Disambiguation4/5

Most tools target a distinct resource and action, but browse_fund_marketplace and get_marketplace_bots are easy to confuse since both surface marketplace bots with performance metrics. The detailed descriptions clarify their different intents, though the naming does not strongly reinforce the distinction.

Naming Consistency4/5

The set almost uniformly uses snake_case verb_noun names like create_fund, list_funds, and update_fund_weights. Minor inconsistencies exist, such as get_marketplace_bots returning a list instead of a single item and browse_fund_marketplace using a different pattern from the other marketplace tools.

Tool Count3/5

At 26 tools, the server is on the heavy side and above the typical well-scoped range. The broad domain of funds, strategies, marketplaces, and market data helps justify the count, but several overlapping marketplace/list tools inflate the surface and could be consolidated.

Completeness4/5

The set covers the core fund lifecycle, roster management, strategy validation/deployment, marketplace browsing, and market data reads quite thoroughly. Minor gaps remain, such as no update/delete operations for strategies and no direct tool for publishing a bot to the marketplace, but these are workable within the existing workflow.