Skip to main content
Glama

Path Risk: Level Touch and Range Expansion Probabilities

get_path_risk
Read-onlyIdempotent

How likely is price to touch a nearby level, or the range to widen, within the next H bars? Use this for stop, target and level questions: 'will BTC tag yesterday's high in the next 5 hours', 'how far can ETH reach in 20 bars'. For the latest closed bar (or a replay at anchorMs) it returns, per horizon: the 48-bar high/low and previous UTC day and week high/low with distance in % and in volatility units and the probability each is touched; the probability the range is wider than the previous H bars (on 5m-1h from the risk-state memory: the 100 most similar past risk states, shrunk toward the history estimate and recalibrated, with similarEpisodes listing the closest five and their outcomes); a touch ladder (prices reached with 75/50/25/10% probability above and below); and an out-of-sample check over the latest bars of this market (Brier against the base rate and a reliability table: predicted vs observed). Method: past H-bar paths measured in units of the volatility at their start, compared with today's distance in today's volatility; no model and no analogue search. A study on 2026-11-14 found this ranked level touches with AUC 0.85-0.91 at 5 bars and beat a gradient-boosted model; which extreme comes first was not predictable, so it is not offered. Quote brief. A probability of reach, not of direction and not a plan. NO_TRADE.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_path_risk"
  }
}

Input Schema

NameRequiredDescriptionDefault
symbolNoBTCUSDT, ETHUSDT, SOLUSDT or ZECUSDT. Default BTCUSDT.BTCUSDT
anchorMsNoReplay at the bar opening at (or last before) this Unix millisecond time instead of the latest closed bar. Only bars already closed are used, so the answer is what the tool would have said then; if the horizon has since passed, the realized result is included.
horizonsNoBars ahead to measure, up to four values from 1 to 120. Default [5, 20].
intervalNoCandle size: 5m, 15m, 1h, 4h, 1d. Default 1h.1h
calibrationBarsNoHow many recent bars the built-in out-of-sample check scores. Default 1000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

The description goes well beyond the read-only annotations by explaining the returned quantities, the risk-state memory method, the touch ladder, the out-of-sample Brier check, and the study behind the AUC claim. It also clearly limits the tool to probability of reach rather than direction or a trading plan.

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?

The description is front-loaded with the core question and use cases, then proceeds through returns, method, and caveats in a logical order. It is long and dense with parenthetical details, but the length is largely justified by the complexity of the outputs and statistical method.

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?

With no output schema, the description carries the burden of explaining what is returned, and it does so comprehensively: per-horizon levels, touch probabilities, range expansion, touch ladder, similar episodes, and out-of-sample checks. It also covers the method and limitations needed to interpret the results correctly.

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?

The input schema already documents all five parameters at 100% coverage, including defaults and bounds. The description adds some operational context around H bars, latest closed bar, and anchor replay, but does not add much parameter-specific meaning beyond the schema, especially for calibrationBars.

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 description immediately states the specific predictive capability: probability that price touches a nearby level or the range widens over the next H bars. It also distinguishes the output from directional forecasts and trading plans, so an agent can identify what this tool is for without opening the 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 gives explicit use cases such as stop, target and level questions, with concrete examples like tagging yesterday's high or reaching a distance within 20 bars. It does not name alternative sibling tools or state when not to use this tool beyond the direction/plan caveat.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources