Skip to main content
Glama
@dwlf/mcp-server

@dwlf/mcp-server

by andywilliams

dwlf_create_subscription

Creates event subscriptions that send alerts to channels like Telegram for strategy entries/exits, custom events, or indicator signals across selected symbols and timeframes.

Instructions

Create a new subscription. Four shapes are supported, distinguished by eventTypeId:

  • strategy.entry.triggered — requires strategyId; pair with mode: 'confirm' or 'auto'. Confirm-mode creates a planned Trade for review; auto-mode opens it directly.

  • strategy.exit.triggered — requires strategyId. Fires when the strategy's exit graph matches, and also delivers that strategy's stop alerts: every live stop-out (fixed or trailing) and a trailing stop locking in breakeven, then each further whole R. strategy.stop.hit / strategy.stop.moved cannot be subscribed to directly.

  • custom_event — requires customEventId. Fires when that custom event fires.

  • any indicator event id (e.g. cycle.low.confirmed, cycle.high.window.early, swing_low_break). Fires on the raw indicator event.

symbols controls scope: an array of symbols, or ['*'] for a wildcard across the whole account universe. timeframes accepts ['1d'], ['1w'], or ['*'] for any. channels is an array of delivery destinations — currently { type: 'telegram', destination: { chatId: <id> }, enabled: true }.

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": {
      "eventTypeId": "<eventTypeId>",
      "symbols": "<symbols>",
      "channels": "<channels>"
    },
    "name": "dwlf_create_subscription"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoOnly meaningful for strategy.entry.triggered. `confirm` = planned Trade for review, `auto` = trade opens directly. Defaults to `confirm`.
enabledNoWhether the subscription is active. Defaults to true.
symbolsYesSymbols to scope to. Use ['*'] for wildcard across the account universe.
channelsYesDelivery channels, e.g. [{ type: 'telegram', destination: { chatId: <number> }, enabled: true }].
quietHoursNo
strategyIdNoRequired when eventTypeId is `strategy.entry.triggered` or `strategy.exit.triggered`.
timeframesNoTimeframes to scope to, e.g. ['1d'], ['1w'], or ['*']. Defaults to ['*'].
eventTypeIdYesEvent source: `strategy.entry.triggered`, `strategy.exit.triggered`, `custom_event`, or an indicator event id like `cycle.low.confirmed`.
customEventIdNoRequired when eventTypeId is `custom_event`.
dedupeWindowMinutesNo
riskPerTradeOverrideNo
accountBalanceOverrideNo
maxConcurrentTradesOverrideNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.77.0

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose the meaningful side effect of mode: 'confirm' creates a planned Trade for review while 'auto' opens it directly, which is exactly the kind of behavioral detail an agent needs. However, it says nothing about permissions, what happens to duplicate subscriptions, dedupe behavior, or what the call returns, and five override/quietHours parameters are never explained.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core action is front-loaded in one sentence, then a tight bulleted taxonomy maps each event type to its requirements, followed by scope parameters. Dense but every clause carries routing information; nothing is repeated from the schema verbatim.

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?

For a 13-parameter mutation tool with nested channel objects, no annotations and no output schema, the description covers the event-type routing logic well but leaves the override parameters, quietHours, and any notion of the created object's identity or return value entirely unexplained. An agent can call it correctly for the common paths but will be guessing on the override fields.

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?

Well above the 62% schema coverage baseline: it explains wildcard semantics for `symbols` (['*'] = whole account universe), allowed `timeframes` values, the `channels` delivery object shape, and the conditional requirement linking `eventTypeId` to `strategyId`/`customEventId`. The gap is the four risk/balance/concurrency overrides plus `dedupeWindowMinutes` and `quietHours`, which are undocumented in both schema and description.

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 specific verb+resource ('Create a new subscription') and then enumerates the four supported event-source shapes, each with its required companion parameter. The taxonomy lets an agent distinguish this from dwlf_update_subscription or dwlf_delete_subscription without opening any schema.

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 per-shape selection rules (strategy.entry.triggered pairs with mode confirm/auto; strategy.exit.triggered requires strategyId; custom_event requires customEventId) and an explicit exclusion: strategy.stop.hit / strategy.stop.moved cannot be subscribed to directly. It stops short of saying when to update an existing subscription instead of creating a new one, which is the one routing gap.

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