Create a cost alert that monitors one or more queries and notifies when a condition fires. MCP is create-only — there is no update_alert; edit in the UI via the returned URL. Accepts the same query config as query (prefer `datePreset` over hand-computed from/to). The firing rule is a single `condition` boolean expression over the query `name`s, e.g. `a > 1000`, `rollingSum(a, 7, DAY) > 50000`, or `(a - timeShift(a, 1, DAY)) / timeShift(a, 1, DAY) > 0.2`. Window math (rollingSum/weekToDateSum/monthToDateSum/timeShift) is evaluated daily in BigQuery, so you do NOT pick an evaluation period — instead set `dedup` to control re-notification frequency (CALENDAR once per WEEK/MONTH, or ROLLING once every N days). The period (`datePreset` or `from`/`to`) defines the preview/look-back window for the underlying queries. Use list_available_destinations for SLACK/TEAMS channel IDs. Returns a URL that you MUST include in your response so the user can view/edit the alert.
EXAMPLE: "Alert me on Slack if our production AWS spend exceeds $50k over any 7 days, at most once a week" → { name: "Prod AWS weekly alert", queries: [{ type: "cost", name: "a", metricId: "cost", currency: "USD", filterCel: "cos_provider in [\"AWS\"] && cos_environment in [\"prod\"]" }], datePreset: "TRAILING_90_DAYS", condition: "rollingSum(a, 7, DAY) > 50000", dedup: { kind: "CALENDAR", calendarUnit: "WEEK" }, notificationChannel: "SLACK", slackChannelId: "C01ABC" }
Connector