clear_development_database

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/clear_development_database, with a bearer credential and the action's payload as the JSON body.

Contract description

Clear an application's development database: drop it with every table and row in it, and create it again empty under the same role. The development credential and the connection string in your environment file keep working. Then call `restart_application` on development, or deploy, so the application's migrations rebuild the tables. Production's database is never cleared. Destructive: completes only after a person approves it in the browser.

Access and action metadata

{
  "name": "clear_development_database",
  "resource": "environment",
  "tier": "destructive",
  "summary": "Clear the development database: drop it with every table and row in it, and create it again empty under its standing role. The development credential and the environment file's connection string stay valid. `restart_application` on development, or a deploy, then runs the application's migrations, which rebuild the tables. Production's database is never cleared.",
  "annotations": {
    "readOnlyHint": false,
    "destructiveHint": true,
    "openWorldHint": false
  }
}

MCP catalog entry

{
  "name": "clear_development_database",
  "tier": "destructive",
  "scenario": "CHI-L0-10",
  "summary": "Clear an application's development database: drop it with every table and row in it, and create it again empty under the same role. The development credential and the connection string in your environment file keep working. Then call `restart_application` on development, or deploy, so the application's migrations rebuild the tables. Production's database is never cleared. Destructive: completes only after a person approves it in the browser.",
  "owners": [
    "DBS-L0-10",
    "PLD-L0-40",
    "MAPI-05"
  ]
}

request

JSON pointer Description and constraints
"" (root) Type: object
Required fields: ["application","environment"]
/properties/application The application id, from `list_applications`.

Type: string
/properties/environment `development` alone; `production` is refused `invalid_request`, because no action clears production's database.

Type: string
Pattern: ^(development|production)$
/properties/request_id Your request identity for this pending action: any string you choose. Repeating the call with the same request_id, from the same account, while the earlier pending action is still live — requested, approved, or executing — answers that pending action again and creates no second one. Once it has completed, failed, been declined, or expired, the same request_id starts a new one. Omitted, every call creates a new pending action.

Type: string

response

JSON pointer Description and constraints
"" (root) The 202 creation envelope: the pending action and its approval link (API-L0-07); the terminal outcome rides the pending record via read_pending_action. A completed clear's outcome carries `cleared: true`, the `application`, the `environment`, the `database` name, its `role`, and a `detail` naming `restart_application` as the act that rebuilds the tables (DBS-L0-10). An application with no development database is refused 404 `not_found` at the request. A development deploy or restart (a `restart_application`) in flight when the approved clear runs fails it with `deploy_in_flight`, and nothing is cleared.

Type: object
Required fields: ["contract_version","pending_action","approval_url"]
/properties/contract_version Required value: 1
/properties/reference 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}$
/properties/pending_action $ref: #/shapes/pending_action
/properties/approval_url Type: string
/properties/detail Type: string

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` alone; `production` is refused `invalid_request`, because no action clears production's database."
      },
      "request_id": {
        "type": "string",
        "description": "Your request identity for this pending action: any string you choose. Repeating the call with the same request_id, from the same account, while the earlier pending action is still live — requested, approved, or executing — answers that pending action again and creates no second one. Once it has completed, failed, been declined, or expired, the same request_id starts a new one. Omitted, every call creates a new pending action."
      }
    }
  },
  "response": {
    "type": "object",
    "description": "The 202 creation envelope: the pending action and its approval link (API-L0-07); the terminal outcome rides the pending record via read_pending_action. A completed clear's outcome carries `cleared: true`, the `application`, the `environment`, the `database` name, its `role`, and a `detail` naming `restart_application` as the act that rebuilds the tables (DBS-L0-10). An application with no development database is refused 404 `not_found` at the request. A development deploy or restart (a `restart_application`) in flight when the approved clear runs fails it with `deploy_in_flight`, and nothing is cleared.",
    "required": [
      "contract_version",
      "pending_action",
      "approval_url"
    ],
    "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."
      },
      "pending_action": {
        "$ref": "#/shapes/pending_action"
      },
      "approval_url": {
        "type": "string"
      },
      "detail": {
        "type": "string"
      }
    }
  }
}

Shared contracts