Skip to main content
Glama
@dwlf/mcp-server

@dwlf/mcp-server

by andywilliams

dwlf_get_backtest_results

Retrieve backtest results by requestId to check headline metrics, with a lightweight summary by default and full per-trade data, equity curves, and signals when needed.

Instructions

Get results for a backtest by requestId. If status is not "complete", poll again shortly. DEFAULTS TO SUMMARY MODE: returns DDB-level per-symbol stats (totalReturn, totalTrades, winningTrades, sharpe, maxDrawdown, finalEquity) and the portfolio-level aggregate metrics object, with all bulky fields stripped (per-symbol trades, equityCurve, signals, monthlyReturns; request-level portfolioEquityCurve, portfolioTrades, portfolioRejectedSignals). Summary is ~1-3 KB vs ~1-3 MB full — use it for headline metric checks, leaderboard-style comparisons, and "did it work" sanity passes. Pass summary: false to get the full payload (per-trade rows, equity curves, signals) — needed for plotting, per-trade analysis, or feeding into another tool. ⚠️ When summary=false, the MCP transport will dump the response to disk and ask you to extract via subagent — budget for that. 📡 For background polling without burning context window: the REST URL is GET https://api.dwlf.co.uk/v2/backtests/{requestId}/results?summary=true. Any simulated figure here (a backtest, a strategy's recorded fires, a replayed skip) is hypothetical: worked out on past data, not actual trading. Say so whenever you report one, and pass on hypotheticalLegend when the response carries it.

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": {
      "requestId": "<requestId>"
    },
    "name": "dwlf_get_backtest_results"
  }
}

Input Schema

NameRequiredDescriptionDefault
summaryNoDefault true — return the lightweight summary view. Set false to pull the full S3-merged payload (~1-3 MB).
requestIdYesBacktest request ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.77.0

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses polling semantics for non-complete status, exact payload sizes (1-3 KB vs 1-3 MB), the consequence that summary=false triggers transport disk-dump and subagent extraction, and the hypothetical nature of simulated figures. This is behavior an agent could not infer from the schema alone.

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 purpose, then the mode default, then mode-selection guidance, then operational caveats — a sensible order. It is long for a two-parameter tool and the size figures are stated twice (inline and in the '~1-3 KB vs ~1-3 MB' sentence), but nearly every sentence carries actionable content.

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?

No output schema and no annotations, so the description must describe returns itself — it names both the per-symbol stat fields and the portfolio aggregate, and warns about the bulky payload. It also covers the REST polling fallback and the hypothetical-data disclaimer, leaving little an agent needs to guess.

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?

Schema coverage is 100% (baseline 3), and the description still adds real meaning for `summary` by enumerating the exact fields retained versus stripped and quantifying the size delta. `requestId` gains nothing beyond the schema's 'Backtest request ID'.

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 a specific verb and resource ('Get results for a backtest by requestId') and clearly defines its two operating modes. It never distinguishes itself from the sibling `dwlf_get_backtest_summary`, which is a real ambiguity given this tool's default summary mode, so it stops short of a 5.

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?

Gives explicit when-to-use guidance for each mode: summary for 'headline metric checks, leaderboard-style comparisons, and did-it-work sanity passes', full for 'plotting, per-trade analysis, or feeding into another tool'. What is missing is any routing versus the sibling backtest-summary and cancel/run tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools