Log item usage
log_item_usageAttribute AI usage to a work item (todo/event) — increments its cached ai_calls / tokens / cost rollup (§2.8).
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": {
"subject_type": "<subject_type>",
"subject_id": "<subject_id>"
},
"name": "log_item_usage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| calls | No | Number of calls (default 1). | |
| tokens | No | Total tokens for this call. | |
| cost_usd | No | ||
| subject_id | Yes | ||
| subject_type | Yes |