Skip to main content
Glama
@dwlf/mcp-server

@dwlf/mcp-server

by andywilliams

dwlf_evaluate_custom_event

Run an on-demand evaluation of a custom event and backfill the needed history so backtests and event queries include fires from the full date range you specify.

Instructions

⚠️ Trigger an on-demand evaluation run for a specific custom event. This is the workflow step BETWEEN activating symbols and querying fires — without it, the custom event only evaluates on the daily cron and historical data is not backfilled until then. Returns { requestId, status: "pending" } — poll dwlf_get_evaluation_status(requestId) until status is "completed", then query fires via dwlf_get_events(type: "custom_event"). Consumes one EVALUATION quota. IMPORTANT: by default only the most recent ~400 candles (~14 months of daily data) are backfilled; older history produces NO fires and any backtest spanning it silently sees zero entries before that window. To backfill the full history a backtest needs, pass lookbackDays covering the whole backtest range (e.g. 2200 for a ~5-6yr window).

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": {
      "eventId": "<eventId>"
    },
    "name": "dwlf_evaluate_custom_event"
  }
}

Input Schema

NameRequiredDescriptionDefault
eventIdYesCustom event ID to evaluate
lookbackDaysNoHow many days of history to (re)evaluate, overriding the default ~400-candle (~14-month) backfill window. Set this to at least the span of any backtest that gates on this event (e.g. 2200 ≈ 6 years) or its early period will have zero fires. Larger-than-history values are safe — evaluation just starts from the earliest available candle.
idempotencyKeyNoOptional client-supplied idempotency key — if a request with this key already exists for this account, the existing requestId is returned instead of creating a new one

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.77.0

TDQS

A4.4/5.0
Behavior3/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 disclose the critical trait: only ~400 candles (~14 months) are backfilled by default and older spans yield silent zero fires, plus it consumes one EVALUATION quota. The return shape ({ requestId, status: "pending" }) is stated. However, it omits auth/permission requirements, whether concurrent runs are allowed, runtime expectations, and failure behavior — meaningful gaps for an async mutation with zero annotation 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 action and the workflow position, then the follow-up chain, then the backfill warning. Dense but every sentence carries operational value; the warning paragraph is long and partially duplicates the lookbackDays schema text, which keeps it from a 5.

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?

With no output schema and no annotations, the description steps up by giving the response shape, the polling loop, and the quota cost. What remains missing is permission/auth context and behavior on failure or duplicate runs, though the idempotencyKey field in the schema partly covers retries.

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 100%, so the baseline is 3, but the description earns more: it explains the default lookback window and the precise reason to pass lookbackDays (span of the backtest, e.g. 2200 for ~5-6yr), including the safety property that larger-than-history values are harmless. That is meaning an agent cannot derive from the schema alone.

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?

Specific verb+resource: 'Trigger an on-demand evaluation run for a specific custom event.' It even situates the tool in the sequence (between activating symbols and querying fires), so an agent can distinguish it from dwlf_compile_custom_event, dwlf_get_events, and dwlf_get_evaluation_status.

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

Usage Guidelines5/5

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

Explicit when-to-use: needed to avoid waiting for the daily cron and to get history backfilled. Explicit follow-up chain is named — poll dwlf_get_evaluation_status(requestId), then dwlf_get_events(type: "custom_event"). The consequence of skipping the tool (no backfill until the cron) is spelled out.

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