Usage
MCP tools for the Usage module. See the Usage module docs for permissions and data model.
list-usage-meters
List usage meters
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
agentId | string | no | Filter by agent public ID |
generationId | string | no | Filter by generation public ID |
traceId | string | no | Filter by trace public ID |
actorId | string | no | Filter by the actor (end user) the usage is attributed to. An actor that does not exist in scope yields an empty page. |
sessionId | string | no | Filter by the session the usage was produced in. A session that does not exist in scope yields an empty page. |
triggerId | string | no | Filter by the trigger that initiated the generation |
actionId | string | no | Filter by logical action id |
meterType | string | no | Filter by meter type (e.g. llm_tokens, compute_execution, api_request, storage) |
limit | number | no | — |
offset | number | no | — |
get-usage
Get aggregated usage for a project
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
projectId | string | yes | Project public ID to aggregate usage for |
groupBy | string | yes | Dimension to bucket by. day buckets on the event's UTC calendar day; the others bucket on the matching column. |
from | string | no | Inclusive lower bound (ISO-8601 timestamp) on the event created_at. Omit for no lower bound. |
to | string | no | Inclusive upper bound (ISO-8601 timestamp) on the event created_at. Omit for no upper bound. |
list-usage-thresholds
List usage thresholds
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
projectId | string | no | Filter by project public ID |
limit | number | no | Maximum number of results to return |
offset | number | no | Number of results to skip |
create-usage-threshold
Create a usage threshold
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
projectId | string | yes | — |
metric | string | yes | — |
window | string | yes | — |
threshold | number | yes | Must be greater than 0 |
delete-usage-threshold
Delete a usage threshold
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
thresholdId | string | yes | Threshold public ID |
get-usage-receipt
Get a generation or run billing receipt
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
generationId | string | no | Generation public ID. Mutually exclusive with run_id. |
runId | string | no | Orchestration run public ID. Returns the receipt summed across every generation the run metered. Mutually exclusive with generation_id. |
get-price-book
Get the price book
Arguments
This tool takes no arguments.
upsert-price-book
Upsert price-book rows
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
prices | array<object> | yes | — |