AI model and MCP tool calls
get_ai_usageModel calls by model (gen_ai spans): calls, per minute, error rate, p50 to p99, total time, input and output tokens; and MCP tool calls by tool (mcp.server spans). Prompt and completion text is never stored, so it is never here.
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_ai_usage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | An ISO time, or how long ago (default now) | |
| from | No | An ISO time, or how long ago: 30m, 24h, 7d | |
| range | No | Window: 1h, 24h, 7d, 14d, 30d or 90d (default 24h). Ignored when from is given. | |
| source | No | backend (servers), frontend (app and web), or all (default) | |
| release | No | Only this release: 2.0.77+185, 2.0.77 (every build) or package@2.0.77+185 | |
| service | No | Only this service, like house-ai-api or the app's bundle id | |
| environment | No | Like production. Default: production when the app has it, else its busiest non-development one. 'all' for every environment. |