set_app_size #
On this page
Generated automatically from the published contract sources.
A script calls this action over HTTPS at POST https://tzcloud.turnzero.ai/v1/set_app_size, with a bearer credential and the action's payload as the JSON body. An MCP connection lists this action as the tool tzcloud_set_app_size.
OAuth access tokens and minted tokens, including the turnzero command's computer token, are bearer credentials. The action determines which kinds, scopes and grants it accepts (Sign-in, sessions, and tokens).
Build metadata: Registered in this build. Registration describes the default dispatcher in this build. It does not guarantee that a caller has the required credential or grant, that a tool is listed for that connection, or that the required service is configured.
Contract description #
Set your application's size, whether production sleeps when idle, or both. The account owner must have requested or agreed to either change. Ask for any size or sleep choice they have not made. If nobody can answer, change nothing and report. A deployed production size change normally re-creates compute, with one cold start outside the request path. With applying, nothing is recorded yet: read read_status with wait_seconds for its end and the size then in effect.
Serverless applications cannot change kind in place. Changing size changes production's charge to that size's rate key. With no recorded sleep choice, larger production stays awake.
More about this action #
shared-0.5gb is smaller and shared-1gb larger; choose the larger for more memory or CPU. Neither size scales beyond one replica or includes usage capacity. Smaller production uses shared compute; larger production has its own container. Read read_status's production_sleep for the setting in effect, whether recorded or defaulted; size alone does not determine the default. Sleeping accepts a cold first request. Development keeps its default size and always sleeps.
Pass at least one of size and production_sleep; null is treated as omitted. changed lists recorded values. With applying, changed is empty and application still holds the old values. The redeploy records requested values only when new compute takes traffic; failure or cancellation records neither. An unchanged value writes nothing.
Read read_status with wait_seconds, following applying.environment and applying.version, for completion and the size then held. Failed re-creation reads failed while production serves its earlier compute; the same call retries it. Do not repeat the act merely to confirm.
Every call before pricing reads usage refuses invalid_request. That also covers no held size, neither change supplied, an unknown size or non-boolean sleep setting. no_such_application means the id is absent from your account. deploy_in_flight means production has a version in flight; wait for its end. A sleep-only change may carry the compute's own refusal; a failed write is entitlement_apply_failed, retried with the same call.
On a size move, plan_schedule_conflict means standing schedules do not fit the target. Unset quantities and unresolved placement carry their own refusals. target_environment_halted means production is halted; deploy_seam_absent means no live provider seam is bound. entitlement_apply_failed covers a failed compute or connection-limit write, and re-creation may refuse to start by name. Passed-through refusals keep the underlying act's name and detail.
A serverless application cannot change kind in place. To run code, ask the owner to choose a size, unless they have already chosen one. For this new server creation alone, with nobody to ask and no size in the task, use shared-0.5gb and report the choice. Call create_application with that size to create a server with a new label and address. Declare its services with submit_manifest, deploy the code and site files there, and check them. Tell the owner the new address. Delete the old serverless application only at the owner's word; until then, it keeps serving. No platform act moves the old hostname to the new server.
A size move changes production's charge to the chosen size's rate key, server-shared-0.5gb or server-shared-1gb. Both draw the account's monthly free usage first. With no recorded production sleep choice, the larger size stays awake for the whole month. Development keeps server-shared-0.5gb.
Access and action metadata #
{
"name": "set_app_size",
"resource": "application",
"tier": "reversible",
"surface": "tzcloud",
"addresses": [
"tzcloud"
],
"product": "cloud",
"clients": [
"bearer",
"browser_session"
],
"summary": "Set your application's size, whether production sleeps when idle, or both. Make either change only at the account owner's request. Ask for any size or sleep choice they have not made. If nobody can answer, change nothing and report. A deployed production size change normally re-creates compute, with one cold start outside the request path. With `applying`, nothing is recorded yet: read `read_status` with `wait_seconds` for its end and the size then in effect.\n\n`shared-0.5gb` is smaller and `shared-1gb` larger; choose the larger for more memory or CPU. Neither size scales beyond one replica or includes usage capacity. Smaller production uses shared compute; larger production has its own container. Read `read_status`'s `production_sleep` for the setting in effect, whether recorded or defaulted; size alone does not determine the default. Sleeping accepts a cold first request. Development keeps its default size and always sleeps.\n\nPass at least one of `size` and `production_sleep`; null is treated as omitted. `changed` lists recorded values. With `applying`, `changed` is empty and `application` still holds the old values. The redeploy records requested values only when new compute takes traffic; failure or cancellation records neither. An unchanged value writes nothing.\n\nRead `read_status` with `wait_seconds`, following `applying.environment` and `applying.version`, for completion and the size then held. Failed re-creation reads `failed` while production serves its earlier compute; the same call retries it. Do not repeat the act merely to confirm.\n\nEvery call before pricing reads usage refuses `invalid_request`. That also covers no held size, neither change supplied, an unknown size or non-boolean sleep setting. `no_such_application` means the id is absent from your account. `deploy_in_flight` means production has a version in flight; wait for its end. A sleep-only change may carry the compute's own refusal; a failed write is `entitlement_apply_failed`, retried with the same call.\n\nOn a size move, `plan_schedule_conflict` means standing schedules do not fit the target. Unset quantities and unresolved placement carry their own refusals. `target_environment_halted` means production is halted; `deploy_seam_absent` means no live provider seam is bound. `entitlement_apply_failed` covers a failed compute or connection-limit write, and re-creation may refuse to start by name. Passed-through refusals keep the underlying act's name and detail.",
"annotations": {
"readOnlyHint": false,
"destructiveHint": true,
"openWorldHint": true
}
}
MCP catalog entry #
{
"name": "set_app_size",
"title": "Set application size",
"tier": "reversible",
"scenario": "CHI-L0-09",
"summary": "Set your application's size, whether production sleeps when idle, or both. The account owner must have requested or agreed to either change. Ask for any size or sleep choice they have not made. If nobody can answer, change nothing and report. A deployed production size change normally re-creates compute, with one cold start outside the request path. With `applying`, nothing is recorded yet: read `read_status` with `wait_seconds` for its end and the size then in effect.\n\nServerless applications cannot change kind in place. Changing size changes production's charge to that size's rate key. With no recorded sleep choice, larger production stays awake.",
"owners": [
"API-L0-28",
"ACB-L0-22",
"PRC-L0-04",
"PRC-L0-05",
"PLD-L0-63",
"PLD-L0-84"
]
}
request #
| JSON pointer | Description and constraints |
|---|---|
| "" (root) | Type: object Required fields: ["application"] |
| / |
Your account's application id from list_applications, not its name or label.Type: string |
| / |
Production's memory and CPU size: shared-0.5gb is smaller, shared-1gb larger. Choose larger for more memory or CPU. Omit to keep it; null is omitted. Type: string Allowed values: ["shared-0.5gb","shared-1gb"] |
| / |
Whether production compute stops when idle. Omit it to keep the setting; null is treated as omitted. Type: boolean |
response #
| JSON pointer | Description and constraints |
|---|---|
| "" (root) | Type: object Required fields: ["contract_version","application","changed","compute"] |
| / |
Required value: 1 |
| / |
The short reference the platform recorded your call under: ten lowercase hexadecimal characters, the value in the call’s record row. Quote it when you report the call. Type: string Pattern: ^[0-9a-f]{10}$ |
| / |
The recorded application values; they remain unchanged while applying is present. Type: object Required fields: ["id","size","production_sleep"] |
| / |
The application id. Type: string |
| / |
The recorded application size. $ref: #/shapes/app_size |
| / |
The recorded production sleep setting. Type: boolean |
| / |
Which size or production_sleep values this call recorded; empty when nothing changed or applying is present. Type: array |
| / |
Type: string Allowed values: ["size","production_sleep"] |
| / |
Sleep-setting results by environment; empty for a size move. Type: array |
| / |
Type: object Required fields: ["environment","outcome"] |
| / |
The environment the sleep setting was brought to. Type: string Allowed values: ["development","production"] |
| / |
The result: unchanged, no_compute, floor_written or redeploy_started. Type: string Allowed values: ["unchanged","no_compute","floor_written","redeploy_started"] |
| / |
Present only while production is being re-created; no requested value is recorded until its traffic switch. Type: object Required fields: ["environment","version"] |
| / |
The requested size, present where the size changes. $ref: #/shapes/app_size |
| / |
The requested sleep setting, present where it changes. Type: boolean |
| / |
The environment of the redeploy being applied. Type: string Allowed values: ["production"] |
| / |
The redeploy version to follow through read_status with wait_seconds. Type: integer |
Complete payload contract #
{
"request": {
"type": "object",
"required": [
"application"
],
"properties": {
"application": {
"type": "string",
"description": "Your account's application `id` from `list_applications`, not its name or label."
},
"size": {
"type": "string",
"enum": [
"shared-0.5gb",
"shared-1gb"
],
"description": "Production's memory and CPU size: shared-0.5gb is smaller, shared-1gb larger. Choose larger for more memory or CPU. Omit to keep it; null is omitted."
},
"production_sleep": {
"type": "boolean",
"description": "Whether production compute stops when idle. Omit it to keep the setting; null is treated as omitted."
}
}
},
"response": {
"type": "object",
"required": [
"contract_version",
"application",
"changed",
"compute"
],
"properties": {
"contract_version": {
"const": 1
},
"reference": {
"type": "string",
"pattern": "^[0-9a-f]{10}$",
"description": "The short reference the platform recorded your call under: ten lowercase hexadecimal characters, the value in the call’s record row. Quote it when you report the call."
},
"application": {
"type": "object",
"required": [
"id",
"size",
"production_sleep"
],
"description": "The recorded application values; they remain unchanged while applying is present.",
"properties": {
"id": {
"type": "string",
"description": "The application id."
},
"size": {
"$ref": "#/shapes/app_size",
"description": "The recorded application size."
},
"production_sleep": {
"type": "boolean",
"description": "The recorded production sleep setting."
}
}
},
"changed": {
"type": "array",
"items": {
"type": "string",
"enum": [
"size",
"production_sleep"
]
},
"description": "Which size or production_sleep values this call recorded; empty when nothing changed or applying is present."
},
"compute": {
"type": "array",
"description": "Sleep-setting results by environment; empty for a size move.",
"items": {
"type": "object",
"required": [
"environment",
"outcome"
],
"properties": {
"environment": {
"type": "string",
"enum": [
"development",
"production"
],
"description": "The environment the sleep setting was brought to."
},
"outcome": {
"type": "string",
"enum": [
"unchanged",
"no_compute",
"floor_written",
"redeploy_started"
],
"description": "The result: unchanged, no_compute, floor_written or redeploy_started."
}
}
}
},
"applying": {
"type": "object",
"description": "Present only while production is being re-created; no requested value is recorded until its traffic switch.",
"required": [
"environment",
"version"
],
"properties": {
"size": {
"$ref": "#/shapes/app_size",
"description": "The requested size, present where the size changes."
},
"production_sleep": {
"type": "boolean",
"description": "The requested sleep setting, present where it changes."
},
"environment": {
"type": "string",
"enum": [
"production"
],
"description": "The environment of the redeploy being applied."
},
"version": {
"type": "integer",
"description": "The redeploy version to follow through read_status with wait_seconds."
}
}
}
}
}
}
Shared contracts #
- Refusals: every refusal, by surface, with its cause and its remedy
- schemas/wire_error.schema.json
- schemas/wire_errors.json
- schemas/action_payloads.json (includes shared shapes)
- management_api_contract.md