venue_ops_find_anomalies
Flag financial anomalies like drifts or spikes in discount, comp, void, and labor rates. Compares the last 7 days against the prior 28 to uncover sustained leaks or one-day events, filtering out findings under 40 EUR.
Instructions
Flag discounts, comps, voids or labour moving against their own baseline.
Compares the last 7 days against the 28 before them and reports two shapes. A drift is a sustained rise across the whole recent window, which is what a till problem or an unfixed rota looks like. A spike is one day far outside the baseline, usually a promotion nobody logged. Findings below 40 EUR are dropped: they are real but not worth a phone call.
Args: params (AnomalyInput): Validated parameters containing: - venue_id (Optional[str]): One venue, or omit to scan all - end (Optional[str]): Last day of the window, defaults to the dataset end - response_format (ResponseFormat): 'markdown' or 'json'
Returns: str: Findings sorted by money at stake, largest first.
JSON schema:
{
"window_end": str,
"findings": [
{
"type": "drift" | "spike",
"metric": str, # discount_rate | comp_rate | void_rate | labour_pct
"label": str, # human wording, e.g. "voided tickets"
"venue_id": str,
"baseline_rate": float, # fraction of 1
"euros_at_stake": float,
# drift only: window, baseline_window, recent_rate, relative_increase
# spike only: date, weekday, day_rate, z_score
}
]
}Examples: - Use when: "Is anything leaking this week?" - Use when: "Check Barcelona for problems ending 5 July." - Don't use when: You want the day's trading figures (use venue_ops_get_day).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |