Record an AI usage event
log_usageRecord token usage from any AI client to track and report environmental impact.
Instructions
Record one AI request's token usage into the local store so it shows up in reports. Use this to manually log usage from any client.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| input_tokens | No | ||
| output_tokens | No | ||
| cached_input_tokens | No | ||
| source | No | Where it came from: "claude-code", "codex", "web", "manual"... | manual |
| session_id | No | ||
| fidelity | No | exact |