---
title: "set_app_size"
description: "Generated reference for the management action set_app_size: its description, access metadata, payload contract, and registration status."
slug: /reference/actions/set-app-size
order: 16
visibility: public
redirects_from: ["/reference/actions/set-plan"]
---

# set\_app\_size

Generated automatically from the [published contract sources](/cloud/reference/about/#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](/cloud/concepts/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

```json
{
  "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

```json
{
  "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<br>Required fields: \["application"\] |
| /<wbr>properties/<wbr>application | Your account's application `id` from `list_applications`, not its name or label\.<br><br>Type: string |
| /<wbr>properties/<wbr>size | 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\.<br><br>Type: string<br>Allowed values: \["shared\-0\.5gb","shared\-1gb"\] |
| /<wbr>properties/<wbr>production\_sleep | Whether production compute stops when idle\. Omit it to keep the setting; null is treated as omitted\.<br><br>Type: boolean |

## response

| JSON pointer | Description and constraints |
|---|---|
| "" \(root\) | Type: object<br>Required fields: \["contract\_version","application","changed","compute"\] |
| /<wbr>properties/<wbr>contract\_version | Required value: 1 |
| /<wbr>properties/<wbr>reference | 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\.<br><br>Type: string<br>Pattern: ^\[0\-9a\-f\]\{10\}$ |
| /<wbr>properties/<wbr>application | The recorded application values; they remain unchanged while applying is present\.<br><br>Type: object<br>Required fields: \["id","size","production\_sleep"\] |
| /<wbr>properties/<wbr>application/<wbr>properties/<wbr>id | The application id\.<br><br>Type: string |
| /<wbr>properties/<wbr>application/<wbr>properties/<wbr>size | The recorded application size\.<br><br>$ref: \#/shapes/app\_size |
| /<wbr>properties/<wbr>application/<wbr>properties/<wbr>production\_sleep | The recorded production sleep setting\.<br><br>Type: boolean |
| /<wbr>properties/<wbr>changed | Which size or production\_sleep values this call recorded; empty when nothing changed or applying is present\.<br><br>Type: array |
| /<wbr>properties/<wbr>changed/<wbr>items | Type: string<br>Allowed values: \["size","production\_sleep"\] |
| /<wbr>properties/<wbr>compute | Sleep\-setting results by environment; empty for a size move\.<br><br>Type: array |
| /<wbr>properties/<wbr>compute/<wbr>items | Type: object<br>Required fields: \["environment","outcome"\] |
| /<wbr>properties/<wbr>compute/<wbr>items/<wbr>properties/<wbr>environment | The environment the sleep setting was brought to\.<br><br>Type: string<br>Allowed values: \["development","production"\] |
| /<wbr>properties/<wbr>compute/<wbr>items/<wbr>properties/<wbr>outcome | The result: unchanged, no\_compute, floor\_written or redeploy\_started\.<br><br>Type: string<br>Allowed values: \["unchanged","no\_compute","floor\_written","redeploy\_started"\] |
| /<wbr>properties/<wbr>applying | Present only while production is being re\-created; no requested value is recorded until its traffic switch\.<br><br>Type: object<br>Required fields: \["environment","version"\] |
| /<wbr>properties/<wbr>applying/<wbr>properties/<wbr>size | The requested size, present where the size changes\.<br><br>$ref: \#/shapes/app\_size |
| /<wbr>properties/<wbr>applying/<wbr>properties/<wbr>production\_sleep | The requested sleep setting, present where it changes\.<br><br>Type: boolean |
| /<wbr>properties/<wbr>applying/<wbr>properties/<wbr>environment | The environment of the redeploy being applied\.<br><br>Type: string<br>Allowed values: \["production"\] |
| /<wbr>properties/<wbr>applying/<wbr>properties/<wbr>version | The redeploy version to follow through read\_status with wait\_seconds\.<br><br>Type: integer |

## Complete payload contract

```json
{
  "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](/cloud/reference/refusals/): every refusal, by surface, with its cause and its remedy
- [schemas/wire\_error\.schema\.json](/cloud/reference/sources/schemas/wire-error-schema/)
- [schemas/wire\_errors\.json](/cloud/reference/sources/schemas/wire-errors/)
- [schemas/action\_payloads\.json](/cloud/reference/sources/schemas/action-payloads/) (includes shared shapes)
- [management\_api\_contract\.md](/cloud/reference/sources/management-api-contract/)
