Skip to main content
Glama
@dwlf/mcp-server

@dwlf/mcp-server

by andywilliams

dwlf_confirm_trade

Confirms a planned trade into an open position, applying actual entry, stop, size, and confirm reasons so the trade journal and decision analytics stay accurate.

Instructions

Confirm (take) a confirm-mode PLANNED trade — turns it into an OPEN position. Only trades with status "planned" can be confirmed. By default it opens at the planned entryPrice / positionSize / stop and stamps entryAt=now; override any of them to reflect what you actually did. ⚠️ OVERRIDING THE STOP IS THE COMMON CASE, not an exception: the engine derives its stop from regular-session candles, so it routinely sits inside the broker's wider range and has to be moved before the take. Overriding initialStop does NOT re-derive positionSize — pass both to keep risk constant. STRONGLY RECOMMENDED: pass confirmReasons[] — WHY the trade is being taken (the symmetric twin of skip reasons; feeds the Counterfactual scorecard / 2x2 decision analytics). Valid confirmReasons: fresh_cycle_entry, trendline_break_confirmed, cluster_confluence, regime_aligned, risk_reward_attractive, adding_to_winner, other. confirmNote is required when a reason is "other". Reasons are optional (untagged confirms still work) but every untagged confirm is decision-analytics data lost. Pair with dwlf_skip_trade to pass instead. Find planned trades via dwlf_list_trades(status: "planned").

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": {
      "tradeId": "<tradeId>"
    },
    "name": "dwlf_confirm_trade"
  }
}

Input Schema

NameRequiredDescriptionDefault
entryAtNoEntry timestamp, ISO 8601 (defaults to now)
tradeIdYesPlanned trade ID to confirm/take
entryPriceNoActual entry/fill price (defaults to the planned entryPrice)
confirmNoteNoEntry rationale note (max 500 chars). Required when a reason is "other".
initialStopNoActual stop the trade opens with (defaults to the planned stop). ⚠️ Overriding this does NOT re-derive positionSize — the planned size was computed from the PLANNED stop, so a wider stop means proportionally more money at risk. Pass positionSize in the same call to hold risk constant.
positionSizeNoActual position size / quantity (defaults to the planned size)
confirmReasonsNoWHY the trade is taken (multi-select; see tool description for the valid set). First = primary.
initialTakeProfitNoActual take-profit the trade opens with (defaults to the planned target)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.77.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and does so: it discloses default behavior (opens at planned entryPrice/positionSize/stop, stamps entryAt=now), the non-obvious coupling that overriding initialStop does NOT re-derive positionSize and therefore changes money at risk, and that confirms feed the Counterfactual scorecard. It also explains why the stop override is common (engine derives stops from regular-session candles vs. the broker's wider range), which is genuine behavior insight, not restated schema.

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?

Purpose and precondition are front-loaded, then defaults, then the stop-override warning, then the reasons guidance — a sensible priority order. It loses a point for redundancy: the stop/positionSize caveat appears in both the description and the initialStop schema property, and the caps/emoji emphasis plus the reasons enumeration make it longer than strictly necessary.

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?

For an 8-parameter mutation tool with no annotations and no output schema, the description covers preconditions, defaults, override risk, and analytics side effects thoroughly. The one gap is that it never says what a successful confirm returns (e.g., the resulting open position), which matters slightly since there is no output schema to fall back on.

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%, but the description still adds meaning beyond it: it enumerates the valid confirmReasons set that the schema only references externally ('see tool description for the valid set'), states confirmNote is required when a reason is 'other', and reinforces the positionSize/initialStop interaction. The reasons taxonomy would be unavailable to an agent without this text.

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 and resource plus the exact state transition: 'Confirm (take) a confirm-mode PLANNED trade — turns it into an OPEN position.' It also scopes the precondition to status 'planned', which separates it cleanly from dwlf_skip_trade, dwlf_close_trade, and dwlf_update_trade.

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?

Gives explicit when-to-use conditions ('Only trades with status "planned" can be confirmed'), an explicit alternative ('Pair with dwlf_skip_trade to pass instead'), and a discovery route ('Find planned trades via dwlf_list_trades(status: "planned")'). Nothing about tool selection 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