Get LLM Usage
get_llm_usageRetrieve aggregated token usage metrics for LLM calls within a specified time range. Filter by model, provider, or service to view token counts broken down by model and service.
Instructions
Get aggregated LLM usage metrics (token counts) for a time period.
Provides breakdowns by model and service.
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_llm_usage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum traces to analyze (default: 1000) | |
| end_time | No | End time in ISO 8601 format | |
| start_time | No | Start time in ISO 8601 format | |
| service_name | No | Filter by service name | |
| gen_ai_system | No | Filter by LLM provider | |
| gen_ai_request_model | No | Filter by requested model name | |
| gen_ai_response_model | No | Filter by actual model used |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |