Read usage and inference costs
get_usageRead usage in projects you can access in the connected organization, including calls without retained traces. Omit project_uuid to include unassigned organization usage. For limited project access, only metrics with recorded organization scope qualify as unassigned usage. All arguments are optional; start with {} for a seven-day summary. Use group_by=model or project to find the most expensive groups, ranked by total_cost descending (stable group-key tie break), up to limit; grouping requires bucket=none. Project groups use public project UUIDs and names when metadata is available. With no grouping, bucket=day returns up to 32 daily buckets over a maximum 31-day window. Costs are USD: cost covers customer model calls, evals_cost covers evaluations, guards_cost covers guards/routing checks, and total_cost includes all three. Counts/tokens/errors describe customer calls, matching the app's usage analytics. This is recorded inference/controls usage, not an invoice or balance; credits, storage and other billing adjustments are not represented. If meta.has_more, increase limit up to 100 or narrow the project/date filter. Requires runtime:read.
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 | Exclusive RFC3339 end time. Defaults to now. Reuse the returned from/to values while paging. | |
| from | No | Inclusive RFC3339 start time. Defaults to seven days before to. The window must be positive and at most 31 days. | |
| limit | No | Maximum groups in a ranking, default 20, maximum 100. Does not truncate ungrouped summaries or daily series. | |
| bucket | No | none (default) for a summary or grouped ranking; day for a compact UTC daily series without grouping. | |
| group_by | No | none (default), model, or project. Grouped rankings require bucket=none. | |
| project_uuid | No | Optional project UUID you can access. Omit to include eligible projects and attributable unassigned organization usage. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| meta | Yes |