create_application #
On this page
Generated automatically from the published contract sources.
A script calls this action over HTTPS at POST https://tzcloud.dev.turnzero.ai/v1/create_application, with a bearer credential and the action's payload as the JSON body. An MCP connection lists this action as the tool tzcloud_create_application.
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 #
Creates your application. serverless is static files, functions or both, with no size. skill:deploy covers servers. Functions share a process with other customers' functions. A server has its own container. Kind is fixed.
Servers use the owner's chosen size, shared-0.5gb or shared-1gb. With no size and nobody to ask, shared-0.5gb is passed. The report notes why, usage while awake and the option to request shared-1gb. A size move needs the owner's request or agreement. An earlier request counts. The owner gets the rate, cold start and retained sleep details before the move. account-application-limit exempts the super-admin grant and unbilled accounts.
Production alone exists at creation. submit_manifest precedes deploy. Development is added with create_environment only if the owner asks to try versions first. Hostnames are <label> (production) and <label>-dev (development).
Rates: read_rate_card. Balance: read_balance.
More about this action #
This call creates the application's record only. Its services are declared with submit_manifest before the first deploy. A new application has production alone, so that deploy serves production. Production alone is used unless the owner asks to try versions on development first, added with create_environment.
Choose serverless for static files, functions or both. Choose a server for a WebSocket or another long connection. Also choose a server for CPU or memory beyond function limits, a native module, a child process or a thread. An existing server, such as an Express or Next.js server, needs a server. Work after a response also needs a server. So does a backend package not proved in a function. A client using Node's http/https or its own transport instead of global fetch also needs a server. Choose a server if the owner needs its own container. Ask the owner if present before choosing a server; it draws usage while awake. For serverless, explain your choice in one line. Say that functions share a process with other customers' functions and a server has its own container.
For serverless, pass name and kind serverless without size. A serverless zip holds client/, functions/ or both, with manifest.json. It may also hold a root package.json, lib/ and migrations/. It needs no start script, server.js, PORT listener or health path. A function is a JavaScript module whose default export has fetch(request) returning a Response. Keep shared code and library copies under lib/; every file under functions/ counts as a function. A database, schedule or egress host may be declared in its manifest when functions are available. The platform applies serverless migrations before a version serves. Storage areas may also be declared.
For a server, pass size with kind server or omitted. Keep the owner's chosen server size. With no size and nobody to ask, create shared-0.5gb and report why, its awake usage and the option to request shared-1gb. A server has its own container and draws usage for time awake. shared-0.5gb is smaller; shared-1gb gives more memory or CPU. Size sets replica memory, CPU and production placement. read_plan_quotas returns their quota rows.
Use set_app_size for a size change, only at the owner's request or agreement. Before a move, explain the chosen size's rate, the normal cold start when deployed production compute is re-created, and the production sleep setting the move keeps. On completion, the move records the setting if previously defaulted. The setting is returned in read_status as production_sleep.
Kind cannot be changed later. Read skill:deploy:new-server for the steps to a separate server application; creating it transfers no hostname, database, files or secrets.
A new shared-1gb server has idle sleep off. If it runs all month, its server charge is the full monthly rate, even with no requests. The account's Free Allowance is shared by all its applications and every other line, including storage, data transfer, email, AI and monthly items. read_balance shows what remains, including any introduction bonus. During the introductory period, while prepaid credit is not sold, nothing is charged in money. When a billed account uses its whole balance, its applications pause, except unlimited and operated applications. The next month or a live grant ends the pause. An application within the account's Free Allowance needs no card.
On read_rate_card, monthly-free-usage is dollars for an account for a UTC month. Production's awake time draws server-shared-0.5gb or server-shared-1gb, each dollars for a month of awake time. A server awake for part of the month draws that part of its monthly rate. Development's awake time draws server-shared-0.5gb by default. Set development_at_size with set_app_size to use the server size's limits and awake-time rate. A shared database adds database-shared, a monthly rate per application. Each daily pass charges one UTC day's share while the application holds a shared database. Charges stop at the first pass after the application no longer holds a shared database or moves production to a dedicated size. No prior charge is refunded. The server keys, any database and all other lines share the account's balance.
On production at creation, shared-0.5gb sleeps when idle by default. On production at creation, shared-1gb has sleep off by default. A later size-only move keeps the sleep setting in effect. A move to the smaller size keeps an awake app awake until the owner turns sleep on. An application moved from the old Standard plan keeps that setting off. A sleeping environment stops after the idle period and takes a cold first request. An environment with sleep off keeps one warm replica and is awake all month except while its account is paused. Its server size draws usage only for awake time. Development always sleeps when idle and has no switch.
name is the readable name. label is name plus a unique key. Hostnames are <label> for production and <label>-dev for development on the platform's domain. The answer's id is the application value for later calls. The answer includes size for a server and omits it for a serverless application.
If the account already has a live app with that name, the call gives HTTP 409 name_taken. Use list_applications for the existing app's ID, or choose another name for a new app.
An unknown kind, a plan, a serverless creation with size, or a request naming neither size nor serverless kind refuses invalid_request before any write. If serverless is unavailable, requesting it gives HTTP 403 serverless_not_available before creating an app. A size whose quantity is unset refuses plan_quantity_unset. A creation past account-application-limit refuses account_application_limit. That limit does not apply under the super-admin grant or on an unbilled account. The answer then includes application_limit_exemption, super_admin or unbilled; otherwise that member is absent.
Access and action metadata #
{
"name": "create_application",
"resource": "application",
"tier": "reversible",
"surface": "tzcloud",
"addresses": [
"tzcloud"
],
"product": "cloud",
"summary": "Create an application for the account.",
"annotations": {
"readOnlyHint": false,
"destructiveHint": false,
"openWorldHint": false
}
}
MCP catalog entry #
{
"name": "create_application",
"title": "Create application",
"tier": "reversible",
"scenario": "CHI-L0-07",
"summary": "Creates your application. `serverless` is static files, functions or both, with no `size`. `skill:deploy` covers servers. Functions share a process with other customers' functions. A server has its own container. Kind is fixed.\n\nServers use the owner's chosen `size`, `shared-0.5gb` or `shared-1gb`. With no size and nobody to ask, `shared-0.5gb` is passed. The report notes why, usage while awake and the option to request `shared-1gb`. A size move needs the owner's request or agreement. An earlier request counts. The owner gets the rate, cold start and retained sleep details before the move. `account-application-limit` exempts the super-admin grant and unbilled accounts.\n\nProduction alone exists at creation. `submit_manifest` precedes deploy. Development is added with `create_environment` only if the owner asks to try versions first. Hostnames are `<label>` (production) and `<label>-dev` (development).\n\nRates: `read_rate_card`. Balance: `read_balance`.",
"owners": [
"ACB-L0-22",
"PRC-L0-04",
"ACB-L0-83",
"ACB-L0-84",
"PRC-L0-05",
"ACB-L0-26"
]
}
request #
| JSON pointer | Description and constraints |
|---|---|
| "" (root) | Type: object Required fields: ["name"] Retired members: plan: plan is no longer passed: use size, shared-0.5gb or shared-1gb. |
| / |
A lowercase slug such as todo-api. Use 1 to 40 characters. Start with a lowercase letter, then use lowercase letters, digits, or hyphens. The slug becomes the readable part of the application's hostname. The platform adds a unique key.Type: string Pattern: ^[a-z][a-z0-9-]{0,39}$ |
| / |
For a server: shared-0.5gb or shared-1gb sets memory, CPU and production placement; read_plan_quotas gives quotas. Keep the owner's choice; otherwise ask if present, or create shared-0.5gb and report its awake usage and the option to request shared-1gb. Serverless takes no size. Type: string Allowed values: ["shared-0.5gb","shared-1gb"] |
| / |
The application kind, fixed at creation. serverless serves static files, functions or both and takes no size. Functions share a process with other customers' functions. A server has its own container and takes a size. Leaving kind out selects server and requires size. Type: string Allowed values: ["serverless","server"] |
response #
| JSON pointer | Description and constraints |
|---|---|
| "" (root) | Type: object Required fields: ["contract_version","application","outcome"] |
| / |
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}$ |
| / |
id, name, label, created_at, size, kind, and cell. A server includes the size passed at creation. A serverless application omits size. The kind is server or serverless. The cell is where the application is placed, or null where no cell is registered. Type: object |
| / |
Type: string Pattern: ^created$ |
| / |
Present only where the call's credential and account pass the account's application limit: super_admin under the super-admin grant, unbilled for an account carrying the mark. Absent otherwise.Type: string Allowed values: ["super_admin","unbilled"] |
| / |
Says the next step, the manifest then the deploy, and that the new application has production alone, so taking it to production is a deploy. It directs the caller to use production alone unless the owner asks to try versions before they serve; only then is create_environment called before deploying, followed by promote. The page at page explains each step.Type: string |
| / |
$ref: #/shapes/page |
| / |
The full address of the new application’s dashboard page. The person who holds its account can open it after signing in. Type: string |
| / |
Calls with action and arguments. Make them in this order: submit_manifest (add manifest), read_rate_card for costs, then deploy_command where present. The array lists the rate read last. A serverless creation omits deploy_command.Type: array |
| / |
Type: object Required fields: ["action","arguments"] Additional properties: false |
| / |
Allowed values: ["submit_manifest","deploy_command","read_rate_card"] |
| / |
Type: object Additional properties: false |
| / |
Type: string |
Complete payload contract #
{
"request": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]{0,39}$",
"description": "A lowercase slug such as `todo-api`. Use 1 to 40 characters. Start with a lowercase letter, then use lowercase letters, digits, or hyphens. The slug becomes the readable part of the application's hostname. The platform adds a unique key."
},
"size": {
"type": "string",
"enum": [
"shared-0.5gb",
"shared-1gb"
],
"description": "For a server: shared-0.5gb or shared-1gb sets memory, CPU and production placement; read_plan_quotas gives quotas. Keep the owner's choice; otherwise ask if present, or create shared-0.5gb and report its awake usage and the option to request shared-1gb. Serverless takes no size."
},
"kind": {
"type": "string",
"enum": [
"serverless",
"server"
],
"description": "The application kind, fixed at creation. serverless serves static files, functions or both and takes no size. Functions share a process with other customers' functions. A server has its own container and takes a size. Leaving kind out selects server and requires size."
}
},
"x-retired": {
"plan": "`plan` is no longer passed: use `size`, `shared-0.5gb` or `shared-1gb`."
}
},
"response": {
"type": "object",
"required": [
"contract_version",
"application",
"outcome"
],
"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",
"description": "id, name, label, created_at, size, kind, and cell (ACB-L0-22). A server includes the size passed at creation. A serverless application omits size. The kind is server or serverless. The cell is where the application is placed, or null where no cell is registered."
},
"outcome": {
"type": "string",
"pattern": "^created$"
},
"application_limit_exemption": {
"type": "string",
"enum": [
"super_admin",
"unbilled"
],
"description": "Present only where the call's credential and account pass the account's application limit: `super_admin` under the super-admin grant, `unbilled` for an account carrying the mark. Absent otherwise (ACB-L0-84)."
},
"detail": {
"type": "string",
"description": "Says the next step, the manifest then the deploy, and that the new application has production alone, so taking it to production is a deploy. It directs the caller to use production alone unless the owner asks to try versions before they serve; only then is create_environment called before deploying, followed by promote (PLD-L0-96). The page at `page` explains each step."
},
"page": {
"$ref": "#/shapes/page"
},
"dashboard": {
"type": "string",
"description": "The full address of the new application’s dashboard page. The person who holds its account can open it after signing in."
},
"next": {
"type": "array",
"items": {
"type": "object",
"required": [
"action",
"arguments"
],
"properties": {
"action": {
"enum": [
"submit_manifest",
"deploy_command",
"read_rate_card"
]
},
"arguments": {
"type": "object",
"properties": {
"application": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"description": "Calls with `action` and `arguments`. Make them in this order: `submit_manifest` (add `manifest`), `read_rate_card` for costs, then `deploy_command` where present. The array lists the rate read last. A serverless creation omits `deploy_command`."
}
}
}
}
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