Agent Spend Report
ledger_reportGenerate an agent spend report for a rolling window, including totals, rail/service breakdowns, budget status, anomalies, and entry counts.
Instructions
Spend report for an agent over a rolling window.
Returns total spend, breakdown by rail and by service, budget status (ok/warning/exceeded), detected anomalies, and entry count.
Requires a credential: either the agent's own agent_secret or its workspace's workspace_key (same rule as GET /v1/report).
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": {
"agent_id": "<agent_id>"
},
"name": "ledger_report"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | report window in days (default 30) | |
| agent_id | Yes | unique agent identifier | |
| agent_secret | No | the agent's own secret (either this or workspace_key) | |
| workspace_key | No | the owning workspace's key (either this or agent_secret) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||