Change a resource's plan
set_resource_planMove a resource, such as a database, to another plan in place. Its data and environment variables stay the same, and attached apps do not restart. A plan change can change what the resource costs, so first call with preview set to true, show the person what changes, and change the plan only once they confirm. The preview lists each limit's current use and its value on both plans, and says what an attached app notices while the change applies. Every answer names from_plan, to_plan, and a status: previewed, applied, or pending with the reason the move has not finished. A move to a plan the resource would not fit is refused and changes nothing. A private system's plan changes only once an org Admin approves it: the call answers requested with a request whose url to give the person, and nothing changes until then. list_catalog_resources names the plans. Requires connecting a Valet account.
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": {
"resource": "<resource>",
"plan": "<plan>"
},
"name": "set_resource_plan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan | Yes | The plan to move to, as list_catalog_resources names it. | |
| preview | No | Report what the change would do without making it. Preview first and confirm with the person before changing the plan. | |
| org_name | No | The Valet organization the resource belongs to. Omit to use the organization the account joined first. | |
| resource | Yes | The resource's name in the organization. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| org | Yes | Name of the Valet organization the resource belongs to. | |
| limits | No | Set on a preview: each limit's current use and its value on both plans. | |
| reason | No | Set when pending: why the last attempt did not finish. | |
| status | Yes | previewed when nothing changed, applied when the resource is on to_plan, pending when Valet accepted the change and is still applying it, or requested when the resource is a private system and an org Admin must approve the change first; nothing changed yet. | |
| request | No | Set when requested: the access request an org Admin approves before the plan changes. Give the person its url and follow it with get_request. | |
| to_plan | Yes | The plan asked for. | |
| resource | Yes | Name of the resource. | |
| from_plan | Yes | The plan the resource was on. | |
| interruption | No | Set on a preview: what an attached app notices while the change applies. Absent when it notices nothing. |