Skip to main content
Glama

TradingCalc MCP: Options, Forex, Risk Stats, Prediction Markets, On-Chain & Crypto Futures

Market Profile: Session Structure

workflow.run_session_structure
Read-only

Market Profile day-type classifier: trend / balance / neutral_trend / normal / normal_var, from TPO, initial balance, range extension and value migration. Use for "is this a trend day or a balance day?". Returns: structure (the day-type label), description, bias, key_signals, key_levels (VAH/VAL/VPOC/IB/session high-low), tails (session-high/low rejection tails and single prints), scenario_framing, invalidation level. Candles come from the venue when candles[] is omitted (past sessions are cached, so repeats are fast); supplying candles[] makes the run network-free and reproducible. session_date must be a completed UTC session, before today; a session with no candles returns an error. Edge cases: instrument non-empty and venue binance or bybit; session_date is a completed UTC session before today; timeframe 1m, 5m, 15m or 30m (default 15m); value_area_rule 0.5 to 0.9 (default 0.70); supplied candles must each have high at or above low, open and close, low at or below them, and volume 0 or more; a session with no candles is an error. Not covered: order flow beyond the candles given, other venues, and any statement about what price will do; the output describes the session and is not a signal.

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": {
      "instrument": "<instrument>",
      "venue": "<venue>",
      "session_date": "<session_date>"
    },
    "name": "workflow.run_session_structure"
  }
}

Input Schema

NameRequiredDescriptionDefault
venueYesExchange to fetch candles from when candles[] not supplied
candlesNoOptional OHLCV for the session; omit to fetch from venue (reproducible + 0 COGS when supplied)
timeframeNoCandle timeframe (default 15m)
instrumentYesSymbol, e.g. BTCUSDT
prev_candlesNoOptional OHLCV for the previous session
session_dateYesSession date YYYY-MM-DD (UTC); must be before today (a completed session)
value_area_ruleNoValue-area fraction 0.5–0.9 (default 0.70)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / session_date / description
      Previous value: -"Session date YYYY-MM-DD (UTC)"New value: +"Session date YYYY-MM-DD (UTC); must be before today (a completed session)"
  2. Changed1 schema field changed
    • changedInput schema / properties / value_area_rule / description
      Previous value: -"Value-area fraction 0.5–0.9 (default 0.71)"New value: +"Value-area fraction 0.5–0.9 (default 0.70)"
  3. Changed1 schema field changed
    • changedInput schema / properties / value_area_rule / description
      Previous value: -"Value-area fraction 0.5–0.9 (default 0.70)"New value: +"Value-area fraction 0.5–0.9 (default 0.71)"
  4. Changed1 schema field changed
    • changedInput schema / properties / candles / description
      Previous value: -"Optional OHLCV for the session — omit to fetch from venue (reproducible + 0 COGS when supplied)"New value: +"Optional OHLCV for the session; omit to fetch from venue (reproducible + 0 COGS when supplied)"
  5. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare read-only and non-destructive, but the description adds real behavior the annotations cannot convey: venue fetching with per-session caching (repeats are fast), a network-free reproducible mode when candles[] is supplied, and explicit error behavior when a session has no candles. It also states hard validation constraints on supplied candles, which is exactly the failure-mode detail an agent needs before calling.

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?

Front-loaded correctly with the classifier purpose, but it devolves into a single run-on paragraph with duplicated content: the 'completed UTC session, before today' rule appears twice and 'a session with no candles returns an error' is stated twice. The 'Edge cases' block restates most of what earlier sentences already said, so trimming would improve it.

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?

With no output schema, the description carries the return contract and does it well, enumerating structure, bias, key_signals, key_levels, tails, scenario_framing and invalidation. It is complete enough to invoke correctly, with only the unexplained prev_candles and the ambiguous 'description' return field as minor omissions.

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 baseline is 3, but the prose adds meaning the schema lacks: the fetch-versus-supply tradeoff for candles[], the requirement that session_date be a completed UTC session before today, and per-candle validity rules (high >= low, open/close bounds, volume >= 0). The one gap is prev_candles, which the description never explains, leaving its role in the computation implicit.

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?

Names a specific resource and classifier output ('Market Profile day-type classifier: trend / balance / neutral_trend / normal / normal_var'), the inputs it derives from (TPO, initial balance, range extension, value migration), and the question it answers. An agent can distinguish it from siblings like run_value_migration or run_breakout_acceptance 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a concrete triggering question ('is this a trend day or a balance day?') and an explicit exclusion block ('Not covered: order flow beyond the candles given, other venues, and any statement about what price will do; the output describes the session and is not a signal'). However, it never names an alternative sibling to use instead, so routing among the many workflow.run_* tools is left partly to inference.

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.