Skip to main content
Glama
@dwlf/mcp-server

@dwlf/mcp-server

by andywilliams

dwlf_create_annotation

Create custom chart annotations on DWLF price charts—such as levels, trendlines, zones, callouts, and position markers—by specifying symbol, timeframe, type, and shape data.

Instructions

Create a chart annotation. type selects the shape; data carries the type-specific fields documented below. Note arrow is the callout/bubble-with-pointer and text is a plain text box — for commentary that points at a level, use arrow.

DATA SHAPES BY TYPE (times = unix-ms, prices = chart price): • hline — {price, color, lineStyle, lineWidth, showPrice, label?}: horizontal price level. • vline — {time, color, lineStyle, lineWidth, showTime, label?}: vertical time marker. • text — {time, price, text, fontSize, color, backgroundColor?}: free text box anchored at a point. Use \n inside text for multi-line — long single-line text renders too wide to read, so break it up. • arrow — {time1, price1, time2, price2, text, fontSize, color, lineStyle, lineWidth}: callout/speech-bubble. The text box sits at (time1,price1); the arrowhead points to (time2,price2). Use this to label a level or zone with a pointer. • trendline — {time1, price1, time2, price2, color, lineStyle, lineWidth, label?, extendLeft?, extendRight?}: line through two points. • ray — {time1, price1, time2, price2, color, lineStyle, lineWidth, label?}: half-line from point 1 through point 2. • rectangle — {time1, price1, time2, price2, color, fillOpacity, lineStyle, lineWidth, label?}: shaded zone between two opposite corners. • channel — {time1, price1, time2, price2, priceOffset, color, lineStyle, lineWidth, fillOpacity, label?, extendLeft?, extendRight?}: parallel channel; the second rail runs priceOffset above (+) / below (−) the base line. • crossline — {time, price, color, lineStyle, lineWidth, showPrice, showTime, label?}: crosshair marker at one point. • emoji — {time, price, emoji, size}: emoji marker (e.g. emoji "🦊"). • timerange — {time1, time2, color, fillOpacity, lineStyle, lineWidth, label?}: vertical time band. • fibRetracement / measure — {time1, price1, time2, price2, levels:number[], showExtensions, extendRight, color, lineStyle, lineWidth, fillOpacity, label?}: fib/measure between two swing points. • fib_extension — {time1, price1, time2, price2, color, lineStyle, lineWidth, label?}: extension projection. • alert_line — {price, color, lineStyle, lineWidth, showPrice, direction:"above"|"below", label?}: a DRAWING of a price-alert line. Creating one here does NOT arm a price alert: nothing will fire, and the web chart shows it as "Alert not armed" until the user arms it there. Deleting an armed line disarms its alert. • long_position / short_position — {time1, time2, entryPrice, stopPrice, targetPrice, label?}: renders an entry line, stop+target zones and a live R:R badge. ALIASES (same storage — prefer the first of each pair): text over note; emoji over icon; alert_line over price_alert; fibRetracement over fib_retracement. TIP: copy an existing shape via dwlf_list_annotations if unsure.

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": {
      "symbol": "<symbol>",
      "timeframe": "<timeframe>",
      "type": "<type>",
      "data": "<data>"
    },
    "name": "dwlf_create_annotation"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesType-specific fields. See DATA SHAPES BY TYPE in the tool description. Max 4KB serialized.
typeYesAnnotation type — see the data-shape reference in the tool description for the fields each one needs.
originNoWho created it: "user" (default), "ai" (agent-generated — use this for your own annotations), or "system".
symbolYesTrading symbol (e.g. BTC, TSLA)
timeframeYesTimeframe (e.g. "daily", "weekly", "hourly")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.77.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full disclosure burden and does unusually well: it warns that `alert_line` will not fire and renders as "Alert not armed", that deleting such a line disarms the alert, and that long single-line text renders unreadably. It omits the return value (no output schema exists), error/limit conditions, and permission requirements for creating annotations.

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?

It is long, but length is justified by the 24-value type enum, and the structure is front-loaded (purpose, then the type caveat, then a scannable bulleted reference, then aliases and a tip). Minor losses from the dense inline prose in the `text` and `alert_line` bullets.

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 nested-object, five-parameter mutation tool with no output schema and no annotations, the description is largely self-sufficient. Two enum values, `pitchfork` and `brush`, appear in the schema but have no data-shape reference, and the return value of a successful create is never stated.

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?

The schema leaves `data` as a bare object with additionalProperties, offering zero field meaning; the description fully compensates by enumerating the exact required fields for each of the ~20 documented types, including units (unix-ms times, chart prices) and sign conventions for channel priceOffset. This is meaning well beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence names a specific verb and resource ("Create a chart annotation") and the type enum plus per-type data shapes make the scope unmistakable. It does not, however, distinguish itself from write-side siblings like dwlf_update_annotation or dwlf_bulk_create_annotations, so an agent must infer those boundaries.

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?

Within the tool, guidance is excellent: "for commentary that points at a level, use `arrow`", the explicit distinction that `alert_line` draws a line without arming an alert, the ALIASES preference rule, and the tip to copy shapes via dwlf_list_annotations. Missing is any statement of when to choose this over update/bulk-create siblings or when not to annotate at all.

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