Skip to main content
Glama
@dwlf/mcp-server

@dwlf/mcp-server

by andywilliams

dwlf_get_decision_stats

Retrieve a decision-quality ledger joining confirmed takes and replayed skips, with a 2x2 outcome matrix, strategy performance, and per-reason hit rates for a chosen window.

Instructions

The decision-quality ledger: TAKES (confirmed trades, judged by actual outcomes — closed realized R, open marks vs initial risk) and SKIPS (judged by the counterfactual replay) joined into one record. Returns: the 2x2 decision matrix (tookRight/tookWrong/skipRight/skipWrong, with open takes and running skips as unjudged open counts), byStrategy records (W/L, net realized R, net open R, skips + saved R), and per-reason hit rates for BOTH vocabularies (byConfirmReason, bySkipReason) — use these to tell the user which of their stated reasons carry alpha (e.g. "your regime_risk_off skips are 3-for-3, +3R saved"). Honesty: only resolved outcomes are judged; paper trades excluded; legacy trades without a genuine numeric R are judged by P&L sign and counted in rUnknown (they contribute no R magnitude). UI equivalent: https://www.dwlf.co.uk/trades/decisions. Optional recent-window scope — months (last N months) or fromDate (YYYY-MM-DD); omit for all-time. A growing skip history dilutes the current-form read, so scope to e.g. months=12 for "recent" decisions. meta.window echoes the applied scope. 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

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "dwlf_get_decision_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
monthsNoScope the ledger to the last N months (recent-form read). Omit = all-time.
fromDateNoScope to decisions on/after this date (YYYY-MM-DD). Takes precedence over months. Omit = all-time.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.77.0

TDQS

A4.2/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the full burden — and it does: only resolved outcomes are judged, paper trades excluded, legacy trades lacking numeric R are judged by P&L sign and bucketed in `rUnknown`, open takes and running skips are unjudged open counts. It also flags all simulated figures (backtests, replayed skips) as hypothetical, instructs the agent to say so, and points to `hypotheticalLegend` and `meta.window`.

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?

Return shape is front-loaded (matrix, byStrategy, reason hit rates) before honesty caveats and scoping advice, so the agent gets the essentials first. It is dense and delivered as one long block rather than segmented, but nearly every sentence carries operational value and little is redundant.

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?

There is no output schema, so the description must explain returns — and it names every key field (matrix quadrants, open counts, byStrategy W/L and R figures, per-reason hit rates, rUnknown, meta.window). Combined with the hypothetical caveat and UI equivalent link, an agent has enough to call it and report results responsibly.

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 100% and the schema already documents both `months` and `fromDate`, including that fromDate takes precedence. The description adds the rationale for scoping (skip-history dilution makes months=12 the 'recent' read), which is mild added meaning but mostly restates what the schema already conveys.

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?

States a concrete verb+resource: a 'decision-quality ledger' that joins TAKES (judged by realized R / marks vs initial risk) and SKIPS (judged by counterfactual replay) into one record. This is specific enough to distinguish it from siblings like dwlf_get_skip_outcomes (skips only) or signal stats, and it immediately tells the agent what the tool is about.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides real usage context: use `byConfirmReason`/`bySkipReason` to tell the user which stated reasons carry alpha, and scope with months=12 for a 'recent' read because skip history dilutes the current-form view. However, it never explicitly says when to pick this over dwlf_get_skip_outcomes or dwlf_get_signal_stats, nor any when-not condition, so routing between siblings is left to inference.

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