Skip to main content
Glama

get_historical_reaction_context

get_historical_reaction_context
Read-onlyIdempotent

Summarize the aggregate post-event reaction pattern across historical macroeconomic events similar to a selected target release.

Use this AGGREGATE-PATTERN tool when the user wants to understand what the historical analog sample collectively showed rather than inspect individual analog events.

It summarizes historical outcomes using statistics and behavioral patterns across standardized post-event windows (M5, M15, H1, H4, H24) such as mean, median, quantiles, directional consistency, reaction-path classification (e.g. IMMEDIATE_CONTINUATION, INITIAL_REVERSAL, FADE, DELAYED_REACTION), persistence, and sample-size-based confidence.

Supported event types: US_CPI and US_NONFARM_PAYROLLS across EURUSD, GBPUSD, and USDJPY.

Similarity methodology is event-specific: US_CPI uses headline/core surprise distance; US_NONFARM_PAYROLLS uses target-relative robust scale normalization (nfp-historical-analog-v1).

Target period: if referencePeriod is omitted, the target is the most recent event of the requested type. Surprises are never estimated, so if that event has no verified pre-release consensus (common right after a new NFP release) the tool fails with NO_VERIFIED_PRE_RELEASE_EXPECTATION. The error details include targetReferencePeriod, latestReleasedPeriod, latestPeriodWithVerifiedExpectation and a hint; to analyze that prior period, retry with referencePeriod=YYYY-MM. Tell the user the newest release could not be analyzed rather than presenting the prior period as the latest.

Every "cannot compute" error has the same shape: "CODE: reason [hint] details={json}", where the JSON always contains code, eventType and hint.

Do NOT use this tool when the user's primary goal is to identify, rank, enumerate, or inspect specific historical analog events. For individual historical cases, use get_historical_analogs. When the user asks for both specific cases and collective pattern analysis, invoke both tools.

The results are deterministic empirical observations only and do not predict future prices or provide trading recommendations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoOptional maximum number of similar historical events to include in aggregate analysis (range 3 to 30, default 10).
eventTypeYesCanonical target event type: US_CPI or US_NONFARM_PAYROLLS.
instrumentNoOptional trading instrument: EURUSD, GBPUSD, or USDJPY. Defaults to EURUSD.
referencePeriodNoOptional reference period in YYYY-MM format (e.g. 2024-06 or 2026-08). If omitted, the most recent event is the target. Use it to analyze a prior period when the latest event has no verified pre-release expectation.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
analogsYes
coverageYes
eventTypeYes
instrumentYes
referencePeriodYes
aggregatePatternYes
reactionStatisticsYes
targetSurpriseProfileYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / referencePeriod / description
      Previous value: -"Optional reference period in YYYY-MM format (e.g. 2024-06 or 2026-08). If omitted, the latest available event is used as the target."New value: +"Optional reference period in YYYY-MM format (e.g. 2024-06 or 2026-08). If omitted, the most recent event is the target. Use it to analyze a prior period when the latest event has no verified pre-release expectation."
  2. Changed5 schema fields changed
    • changedInput schema / properties / eventType / description
      Previous value: -"Canonical target event type. Currently only US_CPI is supported."New value: +"Canonical target event type: US_CPI or US_NONFARM_PAYROLLS."
    • removedOutput schema / $defs / CpiMetricSurprise
      Removed value: -{
      -  "properties": {
      -    "calculationBasis": {
      -      "enum": [
      -        "REPORTED_ACTUAL_MINUS_EXPECTATION",
      -        "DERIVED_ACTUAL_MINUS_EXPECTATION"
      -      ],
      -      "type": "string"
      -    },
      -    "capturedAt": {
      -      "format": "date-time",
      -      "type": "string"
      -    },
      -    "consensus": {
      -      "type": "number"
      -    },
      -    "derivedActual": {
      -      "type": "number"
      -    },
      -    "direction": {
      -      "enum": [
      -        "ABOVE_EXPECTATION",
      -        "BELOW_EXPECTATION",
      -        "IN_LINE"
      -      ],
      -      "type": "string"
      -    },
      -    "provider": {
      -      "type": "string"
      -    },
      -    "reportedActual": {
      -      "type": "number"
      -    },
      -    "surprise": {
      -      "type": "number"
      -    },
      -    "unit": {
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "consensus",
      -    "direction",
      -    "reportedActual",
      -    "surprise",
      -    "unit"
      -  ],
      -  "type": "object"
      -}
    • removedOutput schema / $defs / CpiSurpriseProfile
      Removed value: -{
      -  "properties": {
      -    "coreMom": {
      -      "$ref": "#/$defs/CpiMetricSurprise"
      -    },
      -    "coreYoy": {
      -      "$ref": "#/$defs/CpiMetricSurprise"
      -    },
      -    "headlineMom": {
      -      "$ref": "#/$defs/CpiMetricSurprise"
      -    },
      -    "headlineYoy": {
      -      "$ref": "#/$defs/CpiMetricSurprise"
      -    }
      -  },
      -  "type": "object"
      -}
    • removedOutput schema / properties / analogs / items / properties / surpriseProfile / $ref
      Removed value: -"#/$defs/CpiSurpriseProfile"
    • removedOutput schema / properties / targetSurpriseProfile / $ref
      Removed value: -"#/$defs/CpiSurpriseProfile"
  3. Changed1 schema field changed
    • changedInput schema / properties / instrument / description
      Previous value: -"Optional trading instrument (EURUSD, GBPUSD, USDJPY). Defaults to EURUSD."New value: +"Optional trading instrument: EURUSD, GBPUSD, or USDJPY. Defaults to EURUSD."
  4. Changed1 schema field changed
    • changedInput schema / properties / instrument / description
      Previous value: -"Optional trading instrument. Defaults to EURUSD."New value: +"Optional trading instrument (EURUSD, GBPUSD, USDJPY). Defaults to EURUSD."
  5. Changed1 schema field changed
    • changedInput schema / properties / limit / description
      Previous value: -"Optional maximum number of analogs to analyze (range 3 to 30, default 10)."New value: +"Optional maximum number of similar historical events to include in aggregate analysis (range 3 to 30, default 10)."
  6. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources