FETCH_BLS_CPI = {
"type": "function",
"function": {
"name": "fetch_bls_cpi",
"description": (
"Fetch the latest CPI release from BLS. Returns headline MoM, "
"core MoM, headline YoY, core YoY, and the shelter and "
"services-ex-shelter components."
),
"parameters": {
"type": "object",
"properties": {
"release_month": {
"type": "string",
"description": "Release month in YYYY-MM format.",
},
},
"required": ["release_month"],
},
},
}
FETCH_BLS_NFP = {
"type": "function",
"function": {
"name": "fetch_bls_nfp",
"description": (
"Fetch the latest Nonfarm Payrolls release from BLS. Returns "
"headline payrolls change, unemployment rate, labor force "
"participation, average hourly earnings MoM and YoY, and prior "
"two months' revisions."
),
"parameters": {
"type": "object",
"properties": {
"release_month": {
"type": "string",
"description": "Release month in YYYY-MM format.",
},
},
"required": ["release_month"],
},
},
}
FETCH_FRED_SERIES = {
"type": "function",
"function": {
"name": "fetch_fred_series",
"description": (
"Fetch any FRED time series by series_id (e.g., DGS10, DFF, "
"DEXUSEU, VIXCLS). Returns the most recent value and the "
"trailing 90-day window for regime context."
),
"parameters": {
"type": "object",
"properties": {
"series_id": {
"type": "string",
"description": "FRED series identifier.",
},
},
"required": ["series_id"],
},
},
}
LOOKUP_CONSENSUS = {
"type": "function",
"function": {
"name": "lookup_consensus",
"description": (
"Look up the Wall Street consensus expectation for a given "
"macro release (Bloomberg/Reuters survey median, mean, and "
"high-low range)."
),
"parameters": {
"type": "object",
"properties": {
"release_id": {
"type": "string",
"description": "Release identifier (CPI, NFP, FOMC, GDP, PCE).",
},
"release_date": {
"type": "string",
"description": "Release date in YYYY-MM-DD format.",
},
},
"required": ["release_id", "release_date"],
},
},
}
LOOKUP_HISTORICAL_REACTION = {
"type": "function",
"function": {
"name": "lookup_historical_reaction",
"description": (
"Look up the empirical asset-class reaction in the 60 minutes "
"post-release for comparable historical surprises in the same "
"regime. Returns medians and 25/75 percentiles for 2y, 10y, "
"DXY, SPX, gold, and crude moves."
),
"parameters": {
"type": "object",
"properties": {
"release_id": {"type": "string"},
"surprise_zscore": {
"type": "number",
"description": "Standardized surprise (actual - consensus) / historical_std.",
},
"regime": {
"type": "string",
"description": "Current regime tag (e.g., 'hiking', 'cutting', 'pause', 'risk-on', 'risk-off').",
},
},
"required": ["release_id", "surprise_zscore", "regime"],
},
},
}
FETCH_MARKET_SNAPSHOT = {
"type": "function",
"function": {
"name": "fetch_market_snapshot",
"description": (
"Fetch a live pre-release market snapshot for an asset class. "
"Returns levels, 1-day and 1-week changes, implied vol, and "
"positioning indicators."
),
"parameters": {
"type": "object",
"properties": {
"asset_class": {
"type": "string",
"enum": ["rates", "fx", "equities", "commodities"],
},
},
"required": ["asset_class"],
},
},
}
POST_SLACK_ALERT = {
"type": "function",
"function": {
"name": "post_slack_alert",
"description": (
"Post the synthesized trade brief to a Slack channel via "
"incoming webhook. Use markdown formatting."
),
"parameters": {
"type": "object",
"properties": {
"channel": {
"type": "string",
"description": "Slack channel (e.g., '#macro-desk').",
},
"text": {
"type": "string",
"description": "The formatted trade brief.",
},
},
"required": ["channel", "text"],
},
},
}
ALL_TOOLS = [
FETCH_BLS_CPI,
FETCH_BLS_NFP,
FETCH_FRED_SERIES,
LOOKUP_CONSENSUS,
LOOKUP_HISTORICAL_REACTION,
FETCH_MARKET_SNAPSHOT,
POST_SLACK_ALERT,
]