Skip to main content
Glama

ValuEdge MCP — Stock Valuation, Screener & Portfolio Research

Preview stock trading strategy backtest

preview_backtest

Validate the proposed daily long-only stock or ETF strategy with the existing Research Lab; return exact rules, costs, available dates and preview fingerprint. Indicator signals at completed close fill next session open. Optional fixed USD sizing or percentage allocation; optional conservative daily OHLC protective exits use stop-first for ambiguous bars. Confirm partial coverage explicitly. For comparing the same strategy across securities, preview at most three separate symbols, review actual common dates and confirm the tests before running each with its own ID; compare the saved runs. May prepare a bounded historical cache; does not create a backtest result.

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>",
      "config": "<config>"
    },
    "name": "preview_backtest"
  }
}

Input Schema

NameRequiredDescriptionDefault
configYes
symbolYes

Output Schema

NameRequiredDescriptionDefault
dataNo
errorNo
metadataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / config / properties / initial_cash
      Added value: +{
      +  "maximum": 10000000,
      +  "minimum": 100,
      +  "type": "number"
      +}
    • addedInput schema / properties / config / properties / position_size_usd
      Added value: +{
      +  "maximum": 10000000,
      +  "minimum": 1,
      +  "type": "number"
      +}
    • addedInput schema / properties / config / properties / risk_exit_mode
      Added value: +{
      +  "enum": [
      +    "close_next_open",
      +    "daily_ohlc_conservative"
      +  ],
      +  "type": "string"
      +}
  2. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false and openWorldHint=false, so the bar is lower; the description still adds real behavior beyond them — signals at a completed close fill the next session's open, conservative daily OHLC exits are stop-first on ambiguous bars, partial coverage must be confirmed, and a bounded historical cache may be prepared. These explain the non-read-only side effect (cache preparation) without contradicting destructiveHint=false. It never explains what 'partial coverage' or the 'preview fingerprint' actually mean, which leaves the agent guessing at two key outputs.

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?

Purpose and fill semantics are front-loaded, and each sentence carries information: workflow limits, sizing modes, exit handling, cache side effect, and the non-result disclaimer. It is dense and semicolon-heavy, and the standalone instruction 'Confirm partial coverage explicitly' is cryptic without a referent for what coverage means.

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?

An output schema exists, so return-value explanation is not required, and the description instead covers the parts that matter for invocation: fill timing, sizing options, protective exits, the three-symbol comparison workflow, and the cache side effect. For a tool with a two-parameter but heavily nested config, the remaining gap is the unexplained notion of partial coverage and no guidance on the date/validation fields.

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

Parameters3/5

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

Schema description coverage is 0% over a deeply nested config object (strategy variants, dates, cash, commission/slippage, sizing, protective exits), so the description has to carry the semantic load. It does explain optional fixed-USD sizing versus percentage allocation and optional conservative protective exits, and implies lookback/date availability, but it never mentions commission_bps, slippage_bps, initial_cash, start_date/end_date, validation_start_date, or the four strategy kinds. Partial compensation only.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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: validate a proposed daily long-only stock/ETF strategy against the existing Research Lab, returning exact rules, costs, available dates and a preview fingerprint. It also draws a boundary with the write-side sibling by stating it 'does not create a backtest result', which implicitly separates it from run_backtest without naming it. Clear purpose, but sibling differentiation is inferential rather than explicit.

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?

It gives concrete workflow guidance for the main ambiguous case: comparing one strategy across securities should use at most three separate previews, checking actual common dates and confirming tests before running each with its own ID. It also instructs the agent to confirm partial coverage explicitly. What's missing is a direct statement of when to use this preview versus running the full backtest or listing saved backtests.

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.