Skip to main content
Glama

ValuEdge MCP — Stock Valuation, Screener & Portfolio Research

Run and save a historical trading strategy backtest

run_backtest
Idempotent

Run the reviewed exact strategy with its preview fingerprint and a stable request UUID, save the canonical result, compare against same-security buy and hold, report drawdown, trades, cost stress and coverage. Use identical ID on retry. No live orders.

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>",
      "request_id": "<request_id>",
      "preview_fingerprint": "<preview_fingerprint>"
    },
    "name": "run_backtest"
  }
}

Input Schema

NameRequiredDescriptionDefault
configYes
symbolYes
request_idYes
preview_fingerprintYes
accept_partial_coverageNo

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.8/5.0
Behavior4/5

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

Annotations already cover idempotency and the non-destructive write profile, but the description adds real context beyond them: it saves a canonical result, it explicitly states 'No live orders' (no real trading side effects), and it tells the caller to reuse the same ID on retry. It does not discuss cost, latency, or failure modes for partial coverage.

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?

Front-loaded with the primary verb and dense with useful clauses; every phrase carries information. It is a single run-on sentence, however, so the retry and 'No live orders' points are less scannable than they could be.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Output reporting is well covered and an output schema exists, so return values need no further explanation. The major gap is the complex, zero-coverage config parameter (strategy variants, dates, sizing, stops), which an agent must fully understand to call this correctly and which the description barely touches.

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% and the config object is deeply nested, so the schema alone leaves much unexplained. The description compensates for request_id/preview_fingerprint (stable UUID, retry with the same ID, fingerprint from preview) but says nothing about symbol, config fields, or accept_partial_coverage.

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?

States specific verbs and resource: run the reviewed strategy, save the canonical result, compare against buy-and-hold, report drawdown/trades/cost stress/coverage. The phrase 'with its preview fingerprint' implicitly distinguishes it from preview_backtest, though it never names that sibling outright.

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?

Implies a workflow prerequisite (the strategy must already have been previewed and reviewed to supply the fingerprint) and gives explicit retry guidance ('Use identical ID on retry'). It lacks a named alternative or a statement of when not to use it, so it stops short of a 5.

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.