Skip to main content
Glama
@dwlf/mcp-server

@dwlf/mcp-server

by andywilliams

dwlf_explain_event

Explains a Bitcoin on-chain event type's definition, inputs, threshold and revision risk, plus when it fired, was published late, or was restated since a given day.

Instructions

Explain one Bitcoin on-chain event type (onchain.*) and, for the types the engine evaluates, its occurrences. Gives the DEFINITION: meaning, method and version, inputs, threshold, history start, caveats, revision (can this event's history change under you, and why: immutable / oracle / model / estimated), measuredHistory (how often it fired on DWLF's node, by year, dated) and inEngine. With inEngine: true it also gives OCCURRENCES: date = that day's occurrence (or the nearest days either side); since = what changed, as three disjoint buckets placed by the day a row became knowable (onchain.confirmedAt; an on-chain row dated D is confirmed on D+1): fired (knowable on or after since), published (knowable before since but first served on or after it, e.g. a backfill: new to you, NOT a firing) and revised (served before since, restated on or after it). Each bucket is { count, firstDated, lastDated, rows (the newest), truncated }: quote count, not the rows listed. Neither = the 5 most recent. A date with nothing on it gives occurrence: null and the nearest days. Every occurrence answer carries history { count, first, last, methodVersions } from the live table. Use dwlf_describe_onchain_events to browse or search the types.

⚠️ Read before you report:

  • These are CONDITIONS on the chain, not calls. Describe them; never turn them into buy, sell or hold recommendations.

  • definitionSource: "bundled" means this API does not serve explain yet and the definition is this package's copy, dated by bundledAsOf: say so. A bundled definition has no revision or measuredHistory (null = UNKNOWN, not "cannot change") and no occurrences.

  • occurrencesUnavailable says why there are none (not in the engine, or the read failed). Never infer "it has not fired" from it.

  • priceWithheld: true on a row means this key may not receive the close (data licensing): do not ask for it another way.

  • revised rows changed after they were first served: quote the revision, and revision.why.

  • published rows are history DWLF served late (a backfill): never report them as recent firings.

  • A row with locked: true is of a family the plan does not read (DWLF Block): { eventType, date, …, locked: true, lockedFamily, requiredPlan, upgradeUrl, pricingUrl } (what fired and when; no price, levels, values or meaning). requiredPlan unlocks the detail. Counts and dates outside the rows are real.

  • Check occurrences.responseVersion. 2 or 3 = the bucket shape above (3: rows may be locked). MISSING = an older DWLF API, where fired and revised are plain arrays and fired mixes real firings with late-published history (a backfill): then report as firings only the fired rows whose onchain.confirmedAt (else date) is on or after since, the same rule as version 2, and say that the API is older.

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": {
      "eventType": "<eventType>"
    },
    "name": "dwlf_explain_event"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoYYYY-MM-DD: explain the occurrence on this day
sinceNoYYYY-MM-DD: what fired, was first published, or was restated on or after this day
eventTypeYesAn onchain.* event type id, e.g. onchain.sth_sopr.lose (a `#…` row-key suffix is ignored)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.77.0

TDQS

A4.5/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 discloses `definitionSource: bundled` fallback, `revision` categories (immutable/oracle/model/estimated), `measuredHistory` provenance (DWLF's own node), `occurrencesUnavailable` causes, `priceWithheld` licensing limits, `locked` plan gating with requiredPlan, and `responseVersion` backward compatibility. It also warns that null means UNKNOWN rather than 'cannot change', which is exactly the kind of trap an agent would otherwise fall into.

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

Conciseness3/5

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

The purpose is front-loaded and the '⚠️ Read before you report' bullet block is well organized, but the first paragraph is a dense wall of prose that mixes definition shape, occurrence shape and bucket semantics in one run. Given there is no output schema the return-value detail is largely justified, but the wording is heavier than it needs to be and could be split or trimmed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations and no output schema, the description covers everything an agent needs to interpret the response: definition fields, the three occurrence buckets and their knowability rule, the `history` envelope, the null-occurrence case, locked rows, and legacy responseVersion handling. Only error/rate-limit behavior is unaddressed, which is minor for a read-only explanation tool.

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, but the description adds real meaning: `date` is 'that day's occurrence (or the nearest days either side)' with a null result when nothing fired, `since` is defined as a knowability cutoff producing three disjoint buckets, and a `#…` row-key suffix on `eventType` is ignored. The only gap is that the interaction between supplying both `date` and `since` is not spelled out.

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 (explain) and resource (one on-chain `onchain.*` event type) and immediately scopes what is returned: the DEFINITION plus, for engine-evaluated types, OCCURRENCES. It explicitly routes browsing/searching to `dwlf_describe_onchain_events`, so an agent can separate this from the sibling without opening either 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?

It names the alternative (`dwlf_describe_onchain_events`) and the condition that selects it (browse/search the types), and it clarifies the branch where only a definition is returned (`inEngine: false` → no occurrences). It gives no explicit 'when not to use this' for adjacent tools such as custom-event evaluation, which keeps it below a 5.

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