Read agent usage insights
mba_get_agent_usage_insightsRead the billed usage of a Meta Business Agent account over a billing date range, one entry per HOUR, DAY or MONTH bucket: billable messages, billable tokens, and cost in the account's currency. Returns {usage}; an empty array means no usage in the range. Each entry carries its bucket start and end (Unix seconds, end exclusive), plus channel and sender_id when they are in dimensions. Metrics left out of metric_types are omitted from every entry, not returned as null. Tokens are BILLED tokens, the figure on the invoice, which can be fewer than the tokens the agent consumed. Known limitations: usage insights are ONLY AVAILABLE for numbers whose stack uses its own WABA access token; for any other number this tool returns an error that says so. The range is start INCLUSIVE, end EXCLUSIVE, and dates are evaluated in the billable account's timezone, so a day bucket can be 23 or 25 hours long. MONTH needs a range of whole months: start on the 1st, end on the last day of a month.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"app_id": "<app_id>",
"billable_account_id": "<billable_account_id>",
"start": "<start>",
"end": "<end>",
"granularity": "<granularity>"
},
"name": "mba_get_agent_usage_insights"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | End of the range, Unix seconds. Exclusive: buckets that start before it. | |
| start | Yes | Start of the range, Unix seconds. Inclusive: buckets that start at or after it. | |
| app_id | Yes | The 360dialog channel's app_id. Identifies which WhatsApp number the agent belongs to. | |
| channels | No | Only usage on these messaging surfaces. | |
| dimensions | No | Split each bucket by these axes. Omit to total the whole agent per bucket. | |
| sender_ids | No | Only usage attributed to these sending entities. | |
| granularity | Yes | Size of each bucket. | |
| metric_types | No | Which metrics to return. Omit for all of them. | |
| billable_account_id | Yes | The billable account ID of the Meta Business Agent account. No other tool returns it: Meta Billing Hub shows it under Accounts > Meta Business Agent accounts. It is not the Business Manager ID the budget tools take. |