Get Usage
get_usageThe A2 usage ledger: every metered billing event newest-first with attribution — featureId, amount, the project/job that produced it, and the event's LIST price in USD (a plan allowance may zero it on the invoice). Answer "what did project X cost this period?" with a query instead of summing your own quotes. Filter by projectId, jobId, and/or a [from, to) epoch-ms window. Requires the billing:read scope.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_usage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Period end, epoch milliseconds, EXCLUSIVE. | |
| from | No | Period start, epoch milliseconds, INCLUSIVE. | |
| after | No | Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only. | |
| jobId | No | Only events produced by this job — how to answer "did my failed render post a charge?" for one run. | |
| limit | No | Page size (1..100), default 20. Out-of-range or unparseable clamps into the range. | |
| projectId | No | Only events attributed to this project. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| pagination | No | Cursor pagination metadata. |