Skip to main content
Glama

market_detect_structure

Detect swing highs/lows, HH/HL/LH/LL, breaks of structure, changes of character, and equilibrium/range bounds to evaluate trend continuity or structural breakouts.

Instructions

Detect deterministic market structure: Swing Highs/Lows, HH/HL/LH/LL classifications, Break of Structure (BOS), Change of Character (CHoCH), and Equilibrium/Range bounds. WHEN TO USE: Call when evaluating trend continuity or structural breakouts. NO SIDE EFFECTS.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
candleCountNoNumber of bars to analyze (default 100)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the burden, and it does declare two traits: the computation is 'deterministic' and has 'NO SIDE EFFECTS', which effectively communicates a safe read-only operation. However, it says nothing about cost, latency, data prerequisites (e.g., whether a chart with enough bars must be loaded), or the shape of what comes back.

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

Conciseness5/5

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

Front-loaded with the core purpose, followed by a clearly labeled usage clause and a short safety clause. Every sentence earns its place and there is no filler or redundancy.

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 partially compensates by enumerating the detected structures, which tells the agent what the result will discuss. It still does not describe the response format (per-swing coordinates, timestamps, or labels), so an agent cannot fully anticipate the return payload.

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?

There is a single parameter (candleCount) and schema description coverage is 100%, so the schema already documents it fully as 'Number of bars to analyze (default 100)'. The description adds no extra meaning such as lookback sensitivity or minimum-bar constraints, making the baseline 3 the correct score.

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 verb (Detect) and resource (market structure), then enumerates the exact artifacts produced: Swing Highs/Lows, HH/HL/LH/LL, BOS, CHoCH, Equilibrium/Range bounds. This is enough for an agent to distinguish it from sibling detectors like market_detect_zones or market_get_context 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?

The explicit 'WHEN TO USE: Call when evaluating trend continuity or structural breakouts' gives a clear triggering context. It stops short of naming alternatives or stating when NOT to use it (e.g., vs market_detect_zones for supply/demand), so it does not reach the top band.

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