Skip to main content

Usage

MCP tools for the Usage module. See the Usage module docs for permissions and data model.

list-usage-meters

List usage meters

Arguments

ArgumentTypeRequiredDescription
agentIdstringnoFilter by agent public ID
generationIdstringnoFilter by generation public ID
traceIdstringnoFilter by trace public ID
actorIdstringnoFilter by the actor (end user) the usage is attributed to. An actor that does not exist in scope yields an empty page.
sessionIdstringnoFilter by the session the usage was produced in. A session that does not exist in scope yields an empty page.
triggerIdstringnoFilter by the trigger that initiated the generation
actionIdstringnoFilter by logical action id
meterTypestringnoFilter by meter type (e.g. llm_tokens, compute_execution, api_request, storage)
limitnumberno
offsetnumberno

get-usage

Get aggregated usage for a project

Arguments

ArgumentTypeRequiredDescription
projectIdstringyesProject public ID to aggregate usage for
groupBystringyesDimension to bucket by. day buckets on the event's UTC calendar day; the others bucket on the matching column.
fromstringnoInclusive lower bound (ISO-8601 timestamp) on the event created_at. Omit for no lower bound.
tostringnoInclusive upper bound (ISO-8601 timestamp) on the event created_at. Omit for no upper bound.

list-usage-thresholds

List usage thresholds

Arguments

ArgumentTypeRequiredDescription
projectIdstringnoFilter by project public ID
limitnumbernoMaximum number of results to return
offsetnumbernoNumber of results to skip

create-usage-threshold

Create a usage threshold

Arguments

ArgumentTypeRequiredDescription
projectIdstringyes
metricstringyes
windowstringyes
thresholdnumberyesMust be greater than 0

delete-usage-threshold

Delete a usage threshold

Arguments

ArgumentTypeRequiredDescription
thresholdIdstringyesThreshold public ID

get-usage-receipt

Get a generation or run billing receipt

Arguments

ArgumentTypeRequiredDescription
generationIdstringnoGeneration public ID. Mutually exclusive with run_id.
runIdstringnoOrchestration 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

ArgumentTypeRequiredDescription
pricesarray<object>yes