Skip to main content
Glama
@dwlf/mcp-server

@dwlf/mcp-server

by andywilliams

dwlf_update_trade

Update an existing trade by ID using partial fields such as stop, take profit, position size, direction, entry price, notes, or paper status. Use it to correct or adjust levels on an open trade.

Instructions

Update an existing trade by ID. All fields except tradeId are optional (partial update). Parameter names match dwlf_create_trade / dwlf_confirm_trade: initialStop / initialTakeProfit / positionSize (formerly stopLoss / takeProfit / quantity — the old names are no longer accepted). symbol and tags are NOT editable — the backend has never accepted them, and offering them meant a caller could set one and be told 200 while nothing changed. To change the levels on an OPEN trade use this; to set them as the trade is taken, pass them to dwlf_confirm_trade instead so it is one call.

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_update_trade"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsNoREMOVED — not editable, the backend has never accepted it. Rejected with an error.
notesNoTrade notes
symbolNoREMOVED — not editable, the backend has never accepted it. Rejected with an error.
tradeIdYesTrade ID
quantityNoDEPRECATED — renamed to positionSize. Rejected with an error.
stopLossNoDEPRECATED — renamed to initialStop. Rejected with an error.
directionNoTrade direction
entryPriceNoEntry price
takeProfitNoDEPRECATED — renamed to initialTakeProfit. Rejected with an error.
initialStopNoStop loss price (formerly stopLoss). ⚠️ This rewrites the R BASELINE: every R-multiple is computed from |entryPrice - initialStop|, and a numeric change also clears the stopAnchor provenance. Correct when the stop was WRONG and is being fixed. NOT for trailing a stop up behind price — that silently shrinks the R denominator and reports an inflated R on a winner. Trailing needs a separate field, not this one.
isPaperTradeNoWhether this is a paper trade
positionSizeNoPosition size / quantity (formerly quantity)
initialTakeProfitNoTake profit price (formerly takeProfit)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.77.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the whole burden and does real work: it discloses partial-update behavior, that removed/deprecated fields error out rather than silently no-oping, and that initialStop rewrites the R baseline and clears stopAnchor provenance, with an explicit warning against using it for trailing. It stops short of stating permissions, reversibility of an update, or what the call returns.

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 optionality rule, then the constraint set, then the routing to dwlf_confirm_trade. The parenthetical about the backend having 'never accepted' symbol/tags is useful justification but slightly verbose; overall dense without much waste.

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 a 13-parameter mutation tool with no annotations and no output schema, the description covers the dangerous semantics (R baseline rewrite, silent-no-op avoidance, non-editable fields) that matter most. The remaining gap is return/response behavior, which the agent must discover by calling.

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 the renames, the removed fields, and the R-baseline caveat on initialStop, so the description largely restates structured data. The added value is the framing that all fields except tradeId are optional and that the new names are the only accepted ones, which is modest on top of the schema.

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 ('Update an existing trade by ID') plus partial-update scope, and explicitly contrasts itself with dwlf_confirm_trade and by implication dwlf_create_trade. An agent can distinguish this from the create/confirm siblings without opening a schema.

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 an explicit when-to-use rule: use this to change levels on an OPEN trade, and pass levels to dwlf_confirm_trade when the trade is being taken so it stays one call. It also rules out alternatives by stating symbol and tags are not editable and old parameter names are rejected.

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