Limit programs: update, delete
The Limit Verbs update, delete as MCP do programs, with inputs, result, refusals and an example.
Reference for Limit, one group of Limit programs.
Limit.update
Changes the given properties of a Limit. Verb page.
do: return await $.Limit.update(input)Emits Limit.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Limit. |
amount | money | The most money it allows. | |
count | integer | The most calls or units it allows. | |
period | string | The window a rate resets over, such as a month. | |
percent | number | The largest share off a reference amount it allows, such as 15 percent off list Price. | |
resets | string | One of calendar, rolling: a calendar Limit resets at the start of each period, a rolling one counts the last period from now. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
limit | Limit | required | The Limit. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
{
"name": "do",
"arguments": {
"code": "return await $.Limit.update({ id: 'limit_UWHXYVKsJB', amount: { amount: 29, currency: 'USD' } })"
}
}Limit.delete
Deletes a Limit: a soft delete that keeps its history, undone by Thing.restore. Verb page.
do: return await $.Limit.delete(input)Emits Limit.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Limit. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
limit | Limit | required | The Limit. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
{
"name": "do",
"arguments": {
"code": "return await $.Limit.delete({ id: 'limit_UWHXYVKsJB' })"
}
}