Cost ledger: month-to-date spend, by operation and by tool
spendTrack X API monthly costs, remaining budget, last 24h usage, and price table. Optionally list recent ledger entries.
Instructions
What the account has spent on the X API this billing month according to the local ledger (mirrors X pay-per-use prices, with 24h-UTC read dedup), the remaining budget, the last 24h, and the price table. X does not expose a balance API; reconcile against console.x.com occasionally.
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": "spend"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| recent | No | Also list the last N ledger entries. |