Bellaso Agent API

Tools backed by the forecast module


Performance forecast

POST
https://dtrgbxembnbwlmpvhhms.supabase.co/functions/v1/cortex-mcp
/api/v1/tools/get_forecast
Bearer (ck_ endpoint token)

Projected daily performance from the forecast mart (BigQuery AI.FORECAST fitted over recent actuals), organization-wide or filtered to one product, network, account or campaign. mode=summary (default) returns projected totals for the window; mode=daily returns the projected per-day series. These are MODEL PROJECTIONS, not observed data: label them as forecasts, never add them into an actuals total, and do not present a projected value as something that happened. The mart holds a short FORWARD horizon (about a week ahead, rebuilt nightly), and the window simply selects which of those days come back — a window entirely in the past returns nothing, which is expected rather than a failure. Omit both dates for the default window: the last 30 complete days ending yesterday.

Performance forecast › Request Body

start_date
​string · pattern: ^\d{4}-\d{2}-\d{2}$

Window start, YYYY-MM-DD (inclusive). Omit both dates for the default window: the last 30 complete days ending yesterday.

end_date
​string · pattern: ^\d{4}-\d{2}-\d{2}$

Window end, YYYY-MM-DD (inclusive).

product_id
​string · minLength: 1 · maxLength: 128

Filter to one product id from the org context.

ad_network_id
​string · minLength: 1 · maxLength: 64

Filter to one network: facebook_ads | google_ads | tiktok_ads | linkedin_ads | bingads.

account_id
​string · minLength: 1 · maxLength: 128

Filter to one ad account id.

campaign_id
​string · minLength: 1 · maxLength: 128

Filter to one campaign id.

mode
​string · enum

summary (default) = projected totals for the window; daily = the projected per-day series.

Enum values:
summary
daily

Performance forecast › Responses

The tool ran

ok
​boolean · const · required
Const value:
tool
​string · required
data
​required

The tool's payload — byte-identical to what the same tool returns over MCP.