Skip to main content
Glama

Historical Analogs Distribution

patternfetch_analogs
Read-onlyIdempotent

Find earlier windows IN THE SAME SERIES whose shape resembles the current price action and return the FULL distribution of what followed (win-rate, median, min, max, n) over a fixed forward horizon. Parameters: window = how many recent bars form the shape being matched (default 32); horizon = how many bars forward each match is measured over (default 20). WHEN: an agent wants the historical spread of outcomes after a similar-looking setup, including how wide and how uncertain that spread is. WHEN NOT: you want the current technical picture (use brief), you want to find candidates across the market (use scan), or you need one expected value — this deliberately returns a distribution, not a point estimate. NOT a prediction, NOT a backtest of a strategy; past distribution does not guarantee future results. Example: {"ticker":"ETH/USDT","timeframe":"1d"}. Impersonal data, not advice.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
marketNoOptional asset-class override. Omit and it is inferred from the ticker: a "BASE/QUOTE" pair is crypto, a plain symbol is a US stock/ETF.
tickerYesSymbol to analyse. US stock or ETF like "AAPL" / "SPY", or a crypto spot pair like "BTC/USDT". Always spell crypto as a pair: a bare "BTC" or "ETH" is a real US-listed ETF, NOT the coin, and it will return that ETF's prices without failing. Affected responses carry a "notice" field.
windowNoNumber of recent bars forming the shape matched against history. Default 32.
horizonNoNumber of bars forward over which the outcome after each match is measured. Default 20.
timeframeYesBar size. One of 1m, 5m, 15m, 30m, 1h, 4h, 1d, 1w. Coverage differs per asset class — see the capabilities tool.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changed
    • changedInput schema / properties / ticker / description
      Previous value: -"Symbol to analyse. US stock or ETF like \"AAPL\" / \"SPY\", or a crypto spot pair like \"BTC/USDT\"."New value: +"Symbol to analyse. US stock or ETF like \"AAPL\" / \"SPY\", or a crypto spot pair like \"BTC/USDT\". Always spell crypto as a pair: a bare \"BTC\" or \"ETH\" is a real US-listed ETF, NOT the coin, and it will return that ETF's prices without failing. Affected responses carry a \"notice\" field."
  2. Changed5 schema fields changed
    • addedInput schema / properties / horizon / description
      Added value: +"Number of bars forward over which the outcome after each match is measured. Default 20."
    • addedInput schema / properties / market / description
      Added value: +"Optional asset-class override. Omit and it is inferred from the ticker: a \"BASE/QUOTE\" pair is crypto, a plain symbol is a US stock/ETF."
    • addedInput schema / properties / ticker / description
      Added value: +"Symbol to analyse. US stock or ETF like \"AAPL\" / \"SPY\", or a crypto spot pair like \"BTC/USDT\"."
    • addedInput schema / properties / timeframe / description
      Added value: +"Bar size. One of 1m, 5m, 15m, 30m, 1h, 4h, 1d, 1w. Coverage differs per asset class — see the capabilities tool."
    • addedInput schema / properties / window / description
      Added value: +"Number of recent bars forming the shape matched against history. Default 32."
  3. Changed1 schema field changed
    • addedInput schema / properties / market
      Added value: +{
      +  "enum": [
      +    "crypto",
      +    "stock"
      +  ],
      +  "type": "string"
      +}
  4. First observed

TDQS

A5/5.0
Behavior5/5

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

Annotations already include readOnlyHint, openWorldHint, idempotentHint, destructiveHint. The description adds behavioral context: 'NOT a prediction, NOT a backtest', 'past distribution does not guarantee future results', and clarifies it returns a distribution, not a point estimate. These go beyond annotations and set proper expectations.

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?

The description is well-structured with clear sections (parameters, when/when not, examples, caveats). Every sentence serves a purpose, and it is concise given the complexity.

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 5 parameters, no output schema, the description covers the function, parameter details, usage context, and important caveats. It is fully self-contained and leaves no ambiguity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema coverage, the description still adds value by explaining default values for window and horizon, detailing how market is inferred from ticker, and warning about ticker behavior (crypto vs ETF). This provides meaning beyond the schema.

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 clearly states the tool's purpose: find historical windows matching current price action and return a full distribution of outcomes. It specifies the resource ('same series'), action ('find and return distribution'), and distinguishes from siblings by emphasizing 'FULL distribution' and 'IN THE SAME SERIES'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Explicitly states when to use ('want the historical spread of outcomes') and when not ('want current technical picture' → use brief; 'find candidates across market' → use scan; 'need one expected value'). Provides clear alternative tool names.

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.

TDQS

A4.7/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: analogs for historical patterns, brief for current state, capabilities for metadata, delta for changes, multi for multi-timeframe, scan for screening. No overlap in functionality.

Naming Consistency5/5

All tools follow a consistent 'patternfetch_<noun>' pattern using snake_case, making it predictable. No mixed conventions or ambiguous verbs.

Tool Count5/5

6 tools is well-scoped for a technical analysis server. Each tool earns its place, covering key operations without being excessive or insufficient.

Completeness4/5

The tool set covers core workflows: current state, multi-timeframe, scanning, historical analogs, and polling for changes. Minor gaps (e.g., no raw data endpoint) are acceptable given the server's focus on processed insights.