create_environment
Generated automatically from the published contract sources.
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.
A script calls this action over HTTPS at POST https://turnzero.ai/api/v1/actions/create_environment, with a bearer credential and the action's payload as the JSON body.
Contract description
Turn on the development environment. A new application has one environment, production, and its deploy goes there. After this call it has two: a deploy goes to development, and `promote` moves a version to production. It takes the application and `development`, and it completes in the call. It creates the development sign-in realm where the manifest declares the accounts service, and it declares development's schedules. It provisions no database: `submit_manifest`, called before or after it, provisions development's, and nothing hosted exists until the first deploy to development. On an application that already has two environments it answers `created: false` and repairs a development realm or schedule a failed call left. `delete_environment` turns development off again.
Access and action metadata
{
"name": "create_environment",
"resource": "environment",
"tier": "reversible",
"summary": "Turn on the development environment. A new application has one environment, production, and its deploy goes there. After this call it has two: a deploy goes to development, and `promote` moves a version to production. It takes the application and `development`, and it completes in the call. It creates the development sign-in realm where the manifest declares the accounts service, and it declares development's schedules. It provisions no database: `submit_manifest`, called before or after it, provisions development's, and nothing hosted exists until the first deploy to development. On an application that already has two environments it answers `created: false` and repairs a development realm or schedule a failed call left. `delete_environment` turns development off again.",
"annotations": {
"readOnlyHint": false,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false
}
}
MCP catalog entry
{
"name": "create_environment",
"tier": "reversible",
"scenario": "CHI-L0-07",
"summary": "Turn on the development environment. A new application has one environment, production, and its deploy goes there. After this call it has two: a deploy goes to development, and `promote` moves a version to production. It takes the application and `development`, and it completes in the call. It creates the development sign-in realm where the manifest declares the accounts service, and it declares development's schedules. It provisions no database: `submit_manifest`, called before or after it, provisions development's, and nothing hosted exists until the first deploy to development. On an application that already has two environments it answers `created: false` and repairs a development realm or schedule a failed call left. `delete_environment` turns development off again.",
"owners": [
"PLD-L0-96",
"PLD-L0-40"
]
}
request
| JSON pointer | Description and constraints |
|---|---|
| "" (root) | Type: object Required fields: ["application","environment"] |
| / |
The application id, from `list_applications`. Type: string |
| / |
`development`, the one environment an application can add; `production` is refused `invalid_request`, because production always stands. Type: string Pattern: ^(development|production)$ |
response
| JSON pointer | Description and constraints |
|---|---|
| "" (root) | The development environment turned on, or found on (PLD-L0-96). Nothing hosted is created and no database is provisioned: `submit_manifest` provisions development's database, called before or after this call, and development holds compute from its first deploy. Type: object Required fields: ["contract_version","application","environment","created","environments","hostname"] |
| / |
Required value: 1 |
| / |
The short reference the platform recorded this call under, ten lowercase hexadecimal characters, the value the call’s record row carries; quote it when reporting the call. Type: string Pattern: ^[0-9a-f]{10}$ |
| / |
Type: string |
| / |
Required value: development |
| / |
True where this call turned development on, recording on development the recorded manifest's `realm` member and push entry where it carries them. False where the application already had two environments: the call wrote no count, repaired its development realm and schedules, and recorded only what development lacked. Type: boolean |
| / |
The environments the application has after the call: development and production. Type: array |
| / |
Type: string Allowed values: ["development","production"] |
| / |
The development hostname, `<label>-dev.ai.host`, which serves the application's first deploy to development. Type: string |
| / |
The development sign-in realm, where the recorded manifest declares the accounts service: local runs and the development hostname then sign testers in on it, with accounts of its own. Type: object Required fields: ["realm","outcome"] |
| / |
Type: string |
| / |
Type: string Allowed values: ["created","confirmed"] |
| / |
What changed and the next call, one fact per line: `submit_manifest` where no manifest is recorded, where development lacks the database the manifest declares, or where `delete_environment` removed development's records and no submission ran since; `deploy` otherwise. Type: string |
| / |
$ref: #/shapes/page |
Complete payload contract
{
"request": {
"type": "object",
"required": [
"application",
"environment"
],
"properties": {
"application": {
"type": "string",
"description": "The application id, from `list_applications`."
},
"environment": {
"type": "string",
"pattern": "^(development|production)$",
"description": "`development`, the one environment an application can add; `production` is refused `invalid_request`, because production always stands."
}
}
},
"response": {
"type": "object",
"required": [
"contract_version",
"application",
"environment",
"created",
"environments",
"hostname"
],
"properties": {
"contract_version": {
"const": 1
},
"reference": {
"type": "string",
"pattern": "^[0-9a-f]{10}$",
"description": "The short reference the platform recorded this call under, ten lowercase hexadecimal characters, the value the call’s record row carries; quote it when reporting the call."
},
"application": {
"type": "string"
},
"environment": {
"const": "development"
},
"created": {
"type": "boolean",
"description": "True where this call turned development on, recording on development the recorded manifest's `realm` member and push entry where it carries them. False where the application already had two environments: the call wrote no count, repaired its development realm and schedules, and recorded only what development lacked."
},
"environments": {
"type": "array",
"items": {
"type": "string",
"enum": [
"development",
"production"
]
},
"description": "The environments the application has after the call: development and production."
},
"hostname": {
"type": "string",
"description": "The development hostname, `<label>-dev.ai.host`, which serves the application's first deploy to development."
},
"realm": {
"type": "object",
"required": [
"realm",
"outcome"
],
"properties": {
"realm": {
"type": "string"
},
"outcome": {
"type": "string",
"enum": [
"created",
"confirmed"
]
}
},
"description": "The development sign-in realm, where the recorded manifest declares the accounts service: local runs and the development hostname then sign testers in on it, with accounts of its own."
},
"detail": {
"type": "string",
"description": "What changed and the next call, one fact per line: `submit_manifest` where no manifest is recorded, where development lacks the database the manifest declares, or where `delete_environment` removed development's records and no submission ran since; `deploy` otherwise."
},
"page": {
"$ref": "#/shapes/page"
}
},
"description": "The development environment turned on, or found on (PLD-L0-96). Nothing hosted is created and no database is provisioned: `submit_manifest` provisions development's database, called before or after this call, and development holds compute from its first deploy."
}
}
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