Skip to main content
Glama

validate_strategy

Validate a strategy document without running a backtest.

    A cheap quota separate from backtest runs,
    so validate freely and ALWAYS before run_backtest.

    Args:
        strategy: The strategy document — name, indicators[], and
            condition_tree (see get_strategy_schema for the exact shape).
        injected_indicators: Names of custom time-series columns the
            caller will supply via data_inputs at run time, so conditions
            referencing them validate.

    Returns:
        On success: {"valid": true, "warmup_bars": ..., referenced
        indicators/columns}. On failure: {"valid": false, "errors": [...]}
        where each error carries a machine code, the location in the
        document, a message, and context (e.g. the list of valid column
        names). A failed validation is a NORMAL result, not an error —
        read the errors, fix the document, and validate again before
        running.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
strategyYes
injected_indicatorsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

TDQS

A4.5/5.0
Behavior4/5

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

No annotations provided, so description carries full burden. Discloses it is cheap (separate quota), not a backtest, and that failed validation is a normal result, not an error. This adds useful behavioral context beyond what structured fields would provide.

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?

Well-structured with intro, quota note, and clearly separated Args/Returns sections. Every sentence adds value, though slightly verbose; could be more terse while retaining clarity.

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?

Description covers return format (success and failure cases with detailed error structure) and references get_strategy_schema for strategy shape. Given tool complexity and existing output schema, it provides complete context for an agent to use the tool correctly.

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 coverage is 0%, but description fully compensates with detailed arg explanations: strategy document shape (name, indicators, condition_tree) and how injected_indicators are used. References external schema for exact format, adding clear meaning beyond schema types.

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?

Description clearly states 'Validate a strategy document without running a backtest', providing a specific verb and resource. It distinguishes from siblings like run_backtest by emphasizing the tool does not execute a 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?

Explicitly advises 'validate freely and ALWAYS before run_backtest', indicating when to use. References get_strategy_schema for shape details. No explicit exclusions for other scenarios, but strong guidance is present.

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

A4.2/5.0
Disambiguation5/5

Every tool targets a distinct operation or resource: backtesting, comparison, macro data, reference catalogs, etc. Even similar tools like run_backtest and compare_backtests are clearly differentiated by purpose and inputs.

Naming Consistency4/5

Overall consistent verb_noun pattern in snake_case, with a few exceptions like engine_info (noun_noun) and export_backtest (verb_noun but less common verb). The pattern is predictable and aids agent selection.

Tool Count4/5

20 tools is slightly above the ideal range but justified by the breadth of the platform (backtesting, data retrieval, reference, export). Each tool serves a clear purpose without redundancy.

Completeness4/5

Covers the full backtesting lifecycle: strategy validation, data sourcing, backtesting, comparison, export, and reference lookups. Minor gaps exist (e.g., no explicit strategy persistence), but the core workflow is complete.

Resources