get_event_context
get_event_contextGet the official actual values, pre-release market consensus, and surprise for a specific U.S. macro data release: CPI (US_CPI), Nonfarm Payrolls / jobs report (US_NONFARM_PAYROLLS), or PCE inflation (US_PCE).
WHEN TO CALL: whenever the user asks what a release printed or how it compared with expectations, even if they do not mention FX Context. Do not answer these from memory; recent releases are not in your training data. Examples:
"What's the latest US PCE?" -> US_PCE
"Was core PCE hotter than expected?" -> US_PCE
"Did CPI beat expectations?" -> US_CPI
"What was the latest NFP?" / "How many jobs were added last month?" -> US_NONFARM_PAYROLLS
"Give me the latest US inflation release." -> US_CPI and/or US_PCE
"What were the actual and consensus values?" / "What was the surprise?" -> the release under discussion Omit referencePeriod for the latest release. For a specific release, pass the month the data covers (YYYY-MM), not the month it was published.
WHEN NOT TO CALL: general or educational questions that need no specific release data, e.g. "What is PCE?", "What does NFP stand for?", "Why does CPI matter for FX?", "Explain inflation.", "What is the difference between CPI and PCE?". Use get_upcoming_risks for upcoming release dates, get_market_reaction for price moves after a release, and get_central_bank_changes for central-bank decisions.
RESULT: per-metric official actuals (headline/core, MoM/YoY) with publisher provenance; when valid, pre-release consensus and a deterministic actual-minus-consensus surprise. Each observation has consensusStatus (AVAILABLE, NOT_FOUND, NOT_CAPTURED, NOT_AVAILABLE, EXCLUDED_POST_RELEASE, NOT_APPLICABLE) explaining any missing consensus, and revisionStatus (REVISED, UNCHANGED, NOT_CAPTURED). Consensus is valid only when capturedAt is before releaseCutoffAt. Never treat missing consensus or surprise as zero. Official actuals and third-party consensus keep separate source provenance. No trading recommendations or market-direction predictions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| eventType | Yes | Canonical financial event type. Supported values: US_CPI (Consumer Price Index; headline and core CPI) US_NONFARM_PAYROLLS (NFP / jobs report; payrolls, unemployment rate, average hourly earnings) US_PCE (PCE / core PCE price index) Use these values exactly. | |
| referencePeriod | No | Optional reference period in YYYY-MM format (e.g. 2026-08). If omitted, the latest available event of that type is returned. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | ||
| status | Yes | ||
| eventId | Yes | ||
| category | Yes | ||
| eventType | Yes | ||
| releasedAt | No | ||
| scheduledAt | Yes | ||
| jurisdiction | Yes | ||
| observations | Yes | ||
| referencePeriod | No | ||
| affectedCurrencies | Yes |