set_log_retention #

View this page as Markdown

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/set_log_retention, with a bearer credential and the action's payload as the JSON body. An MCP connection lists this action as the tool tzcloud_set_log_retention.

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 #

Turn your application's longer log retention on or off. The account owner must have requested or agreed to turning this option on or off. If their choice is missing and nobody can answer, leave it unchanged and report. Turning it on adds today's share of the monthly rate. Turning it off stops charges at the next daily pass and returns nothing already charged. The next retention run deletes entries older than seven days. Turning it on again cannot restore them. The answer's log_retention_days is the recorded state. Nothing continues in the background for this act.

More about this action #

Pass days as 30 to turn the option on or 7 to turn it off. Turning on sets the option after today's share is charged or already recorded. Turning it on for a different application that day adds a separate charge. A repeat for an option already on adds no charge. An unbilled account bypasses the balance check and incurs no real charge. The option has its own retained-bytes bound; log writes past it refuse log_capacity_reached.

A days value other than 7 or 30 or an application on the unlimited plan is refused invalid_request. no_such_application means the id is absent from your account. A turn-on that needs a charge refuses balance_short unless remaining Free Allowance plus available credit exceeds the option's charge for the rest of the UTC month, including today. rates_unread means rate rows or the switch instant could not be read when a new charge was needed; nothing was charged, so try shortly.

option_not_set means the option was not turned on, and any posted charge remains. If the application still exists, retry the call. A retry for the same application on the same UTC day adds no charge. Turning off charges nothing. No further state read is needed beyond the returned log_retention_days.

Access and action metadata #

{
  "name": "set_log_retention",
  "resource": "application",
  "tier": "reversible",
  "surface": "tzcloud",
  "addresses": [
    "tzcloud"
  ],
  "product": "cloud",
  "clients": [
    "bearer",
    "browser_session"
  ],
  "summary": "Turn your application's longer log retention on or off. Turn this option on or off only at the account owner's request. If their choice is missing and nobody can answer, leave it unchanged and report. Turning it on adds today's share of the monthly rate. Turning it off stops charges at the next daily pass and returns nothing already charged. The next retention run deletes entries older than seven days. Turning it on again cannot restore them. The answer's `log_retention_days` is the recorded state. Nothing continues in the background for this act.\n\nPass `days` as 30 to turn the option on or 7 to turn it off. Turning on sets the option after today's share is charged or already recorded. Turning it on for a different application that day adds a separate charge. A repeat for an option already on adds no charge. An unbilled account bypasses the balance check and incurs no real charge. The option has its own retained-bytes bound; log writes past it refuse `log_capacity_reached`.\n\nThe call refuses `invalid_request` if `days` is neither 7 nor 30 or if the application is on the unlimited plan. `no_such_application` means the id is absent from your account. A turn-on that needs a charge refuses `balance_short` unless remaining Free Allowance plus available credit exceeds the option's charge for the rest of the UTC month, including today. `rates_unread` means rate rows or the switch instant could not be read when a new charge was needed; nothing was charged, so try shortly. `option_not_set` means the option was not turned on, and any posted charge remains. If the application still exists, retry the call. A retry for the same application on the same UTC day adds no charge. Turning off charges nothing. No further state read is needed beyond the returned `log_retention_days`.",
  "annotations": {
    "readOnlyHint": false,
    "destructiveHint": true,
    "openWorldHint": false,
    "idempotentHint": true
  }
}

MCP catalog entry #

{
  "name": "set_log_retention",
  "title": "Set log retention",
  "tier": "reversible",
  "scenario": "CHI-L0-09",
  "summary": "Turn your application's longer log retention on or off. The account owner must have requested or agreed to turning this option on or off. If their choice is missing and nobody can answer, leave it unchanged and report. Turning it on adds today's share of the monthly rate. Turning it off stops charges at the next daily pass and returns nothing already charged. The next retention run deletes entries older than seven days. Turning it on again cannot restore them. The answer's `log_retention_days` is the recorded state. Nothing continues in the background for this act.",
  "owners": [
    "API-L0-29",
    "ACB-L0-26",
    "LGS-L0-14",
    "PRC-L0-16"
  ]
}

request #

JSON pointer Description and constraints
"" (root) Type: object
Required fields: ["application","days"]
/properties/application Your account's application id from list_applications, not its name or label.

Type: string
/properties/days 30 turns longer log retention on; 7 turns it off. Turning off lets the next retention run delete older entries permanently.

Type: integer
Allowed values: [7,30]

response #

JSON pointer Description and constraints
"" (root) Type: object
Required fields: ["contract_version","application","log_retention_days","changed"]
/properties/contract_version Required value: 1
/properties/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.

Type: string
Pattern: ^[0-9a-f]{10}$
/properties/application The application id.

Type: string
/properties/log_retention_days The retention days now held by the application.

Type: integer
Allowed values: [7,30]
/properties/changed False when the requested retention was already held and no charge was posted.

Type: boolean

Complete payload contract #

{
  "request": {
    "type": "object",
    "required": [
      "application",
      "days"
    ],
    "properties": {
      "application": {
        "type": "string",
        "description": "Your account's application `id` from `list_applications`, not its name or label."
      },
      "days": {
        "type": "integer",
        "enum": [
          7,
          30
        ],
        "description": "30 turns longer log retention on; 7 turns it off. Turning off lets the next retention run delete older entries permanently."
      }
    }
  },
  "response": {
    "type": "object",
    "required": [
      "contract_version",
      "application",
      "log_retention_days",
      "changed"
    ],
    "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": "string",
        "description": "The application id."
      },
      "log_retention_days": {
        "type": "integer",
        "enum": [
          7,
          30
        ],
        "description": "The retention days now held by the application."
      },
      "changed": {
        "type": "boolean",
        "description": "False when the requested retention was already held and no charge was posted."
      }
    }
  }
}

Shared contracts #