ClockNext: update credit
clocknext_update_creditReplace a credit by ID with a complete new definition — a full rewrite that clears omitted fields. Pass current values to modify only active state or deliberately re-point agentKey.
Instructions
Replace a credit by id with its COMPLETE new definition — a full rewrite, NOT a partial patch (omitted fields are cleared). Pricing is re-grounded from the models mixer you pass (same as create). To only flip active state, pass the current values plus isActive. Read the current credit with clocknext_get_credit first. Changing agentKey re-points which runtime signals map here — do it deliberately.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The credit id to update. | |
| name | Yes | Credit name. | |
| models | Yes | The model mixer that GROUNDS the price — one or more enabled catalog models with avg tokens + input/output/cache split. The tool reads live prices and computes the base cost; you never type a raw price. | |
| agentKey | Yes | Lowercased stable key you report credit usage against (sent as `agentKey` when recording usage). The credit's durable identity. | |
| description | No | Optional human-readable description. | |
| marginPercent | Yes | Markup over the computed base cost, as a percent (e.g. 100 = double the base = pricePerCredit). | |
| tokensPerCredit | No | How many tokens equal one credit (defaults to 0). Governs how usage draws the credit down. |