Skip to main content
Glama
@dwlf/mcp-server

@dwlf/mcp-server

by andywilliams

dwlf_create_thesis

Save what you are waiting for on a symbol and why, as ordered conditions plus optional invalidation. DWLF checks nightly after the close and alerts when a step is met or the thesis is challenged.

Instructions

Save what the user is waiting for on a symbol, and why: ordered steps of conditions, optional invalidation conditions, and the user's own context and next step. DWLF checks it once a night after the close and tells the user when a step is met or it is challenged (a Telegram digest if set up, an in-app notification, and dwlf_list_thesis_fires); nothing known before a condition was saved counts. Build it tight and detectable: only the listed condition types, each label saying exactly what its fields check. For "the next pivot after one I already know of" use pivot_confirmed with after. Before the confirming low exists, an invalidation cannot be "a close below the new low": use engine_event cycle.low.break (the latest confirmed low breaks) or a close_vs_level against a level the user already knows. Worked examples: dwlf_thesis_guide. Use dryRun: true first: it restates every condition in plain words (checks) and checks each can occur, writing nothing. Show the restatement to the user before saving. Refusals: 422 CANNOT_OCCUR (a condition can never happen for its symbol), 422 ALREADY_MET (a step condition is already true now; set allowAlreadyMet to save anyway). The refusal's checks are returned. clientKey makes the call an upsert (re-sending an identical thesis writes nothing; a changed one writes a new revision). Condition types: pivot_confirmed (the next confirmed cycle low/high, optionally inside a level), close_vs_level (a daily/weekly close or intraday trade beyond a level), window_opens, window_closes (invalidation only: the stored window closes with no pivot of its side; only when the user asks to void the thesis by time), trendline_break, engine_event (a short allow-list), manual. Full parameters and definitions: dwlf_list_thesis_condition_types.

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>",
      "title": "<title>",
      "steps": "<steps>"
    },
    "name": "dwlf_create_thesis"
  }
}

Input Schema

NameRequiredDescriptionDefault
groupNoOptional grouping, e.g. a watchlist name.
stepsYesOrdered: step n+1 is checked only after step n is met. Limits: dwlf_list_thesis_condition_types.
titleYesOne line: what you are waiting for.
dryRunNoRestate and check only; nothing is saved.
symbolYesThe thesis symbol, e.g. AMZN, BTC-USD.
contextNoYour assessment, why you are waiting. Replayed verbatim in every alert.
nextStepNoWhat you intend to look at when it fires (your words).
clientKeyNoYour stable key for this thesis (e.g. "amzn-dcl-nov"), making re-sends safe.
invalidationNoAny one of these happening marks the thesis challenged (review it). Optional. window_closes goes only here.
allowAlreadyMetNoSave even if a step condition is already true now.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.77.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it states the nightly post-close evaluation cadence, the notification channels (Telegram digest, in-app, dwlf_list_thesis_fires), that nothing predating a saved condition counts, that dryRun writes nothing and returns plain-word `checks`, and that clientKey turns the call into an upsert with revisions on change. Refusal codes 422 CANNOT_OCCUR and 422 ALREADY_MET with the allowAlreadyMet escape hatch are disclosed.

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 dry-run workflow are front-loaded, and nearly every sentence carries operational content. The final condition-type enumeration is dense but replaces what would otherwise be a schema read, so it earns its length; only a little tightening is possible.

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 10-parameter, deeply nested creation tool with no output schema, this covers evaluation timing, notifications, refusal handling, dry-run, and upsert semantics well. The remaining gap is what a successful save returns (thesis id, condition ids to reuse on revise, the `checks` payload shape outside dryRun), which the agent would need to know before revising later.

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?

Schema coverage is 100%, so the baseline is 3; the description adds real meaning on top, notably the upsert/revision semantics of clientKey and the tie between allowAlreadyMet and the ALREADY_MET refusal, plus the `after` field's role on pivot_confirmed. It does not re-explain structural parameters like steps, match, or context because the schema already documents them well.

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?

The opening sentence names a specific verb and resource — saving a thesis on a symbol as ordered steps of conditions with optional invalidation, context, and next step — which is far more precise than the bare name suggests. It also distinguishes the object from generic alerts by stating what gets evaluated and when (once nightly, after the close). An agent can tell this creates a monitored, multi-step thesis rather than a one-off alert.

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 guidance is present throughout: run dryRun first and show the restatement to the user before saving, use pivot_confirmed with `after` for 'the next pivot after one I know of', use engine_event cycle.low.break or close_vs_level when no confirming low exists yet, and add window_closes only when the user wants the thesis voided by time. It also routes the agent to dwlf_thesis_guide and dwlf_list_thesis_condition_types for details rather than inlining everything.

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