margint_check_budget
Validate a customer's budget before triggering an LLM call. Returns whether the call is allowed, with any warnings or breaches. Cached server-side for 60 seconds.
Instructions
Check whether a customer is still within their configured monthly budgets. Agents can call this before making an LLM call to self-gate. Returns { allowed: true | false } with any warnings or breaches. Cached 60s server-side.
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": {
"customer": "<customer>"
},
"name": "margint_check_budget"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| customer | Yes | The customer's external ID. | |
| feature | No | Optional feature for feature-scoped budgets. |