Skip to main content
Glama

Get market structure

get_market_structure
Read-only

Market structure of a symbol at a moment, as TraderWAI's rule engine sees it (closed candles only, no look-ahead): confirmed swings, the last break of structure (BOS / CHoCH), trend by structure (higher highs and lows / lower highs and lows), the last impulse with its Fibonacci levels and the live zones (order blocks, flip zones = broken bases, Fibonacci 0.5-0.618 zone, fair value gaps, equal highs/lows) with how many times price has visited each. Use it to explain a past date ("why did the backtest enter here?"), to check that the detection matches the user's chart before trusting a structure backtest, or to pick concrete levels for an analysis. at = an ISO time (default now). Pure calculation on TraderWAI's market feed, no AI.

Input Schema

NameRequiredDescriptionDefault
atNoISO 8601 time to look at (default now): what was known at the close of the last candle before it
symbolYesSymbol (e.g. XAU_USD, EUR_USD, NAS100_USD)
strengthNoCandles on each side of a swing (1-10, default 3; the same parameter as in the rules)
timeframeYesStructure timeframe
minSwingAtrNoIgnore swings that stand out less than this × ATR(14) (default 0)

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?

Goes well beyond the readOnly/destructive annotations by disclosing the decisive behavioral traits: closed candles only, no look-ahead, pure deterministic calculation on TraderWAI's market feed with no AI involved. It also explains that each zone carries a visit count, which tells the agent what the numbers mean. These caveats are exactly what an agent needs to trust or qualify results.

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?

Front-loads the resource and its returned contents, then pivots to usage scenarios, which is a sensible order. The single dense opening sentence and the schema-duplicating 'at = an ISO time (default now)' clause are minor waste but don't obscure the point.

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?

There is no output schema, yet the description enumerates the return payload (swings, BOS/CHoCH, trend, impulse, Fibonacci, zones with visit counts) and the closed-candle/no-look-ahead semantics that determine how those values should be read. That is sufficient for an agent to call and interpret the result 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?

Schema description coverage is 100%, so the schema already documents symbol, timeframe, at, strength, and minSwingAtr. The description only restates the `at` parameter ('an ISO time, default now'), which duplicates the schema, and adds nothing about strength or minSwingAtr beyond it. Baseline 3 applies when the schema does the work.

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?

States a specific resource ('market structure of a symbol at a moment') and enumerates exactly what it computes: confirmed swings, last BOS/CHoCH, trend by structure, last impulse with Fibonacci levels, and live zones with visit counts. This clearly separates it from siblings like get_ohlc or get_chart, which return raw data rather than derived structure.

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 three concrete usage scenarios: explaining a past date ('why did the backtest enter here?'), validating that detection matches the user's chart before trusting a structure backtest, and picking concrete levels for analysis. It lacks an explicit when-not or a named alternative (e.g. get_ohlc for raw candles), which keeps it from a 5.

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