preview_resource_delete
Preview deliberate deletion of exactly one Stack, Deployment or Server by kind and stable ID, with action=delete and trusted configuration access. Resolve through positive inventory policy, identify deployed cleanup names, fresh known container IDs and bounded visible Alerter/Server-dependent references; disclose hidden, truncated and unavailable effects. Core can tear down live workloads inside a definition write, skip cleanup or remove the record despite cleanup errors. Server deletion leaves host workloads and can leave current Builder server_ids references dangling. Return the shared bounded ten-minute single-use preview_id. Applying requires BOTH local grants regardless of previewed state. No mutation is submitted by preview.
Availability
KOMODO_ALLOW_CONFIGURATION_EDIT=true
The instance’s tool selection and upstream Core permissions also apply. Some inputs require additional grants.
Effect annotations
readOnlyHint—truedestructiveHint—trueidempotentHint—false
Inputs
The registered schema gives field types, alternatives and declared bounds. The description and operator guides also cover checks applied at runtime.
action- Required · Schema
Action target- Required · Schema
Target
Show input JSON Schema
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"action": {
"$ref": "#/$defs/Action"
},
"target": {
"$ref": "#/$defs/Target"
}
},
"required": [
"target",
"action"
],
"$defs": {
"Action": {
"enum": [
"delete"
],
"type": "string"
},
"ResourceKind": {
"enum": [
"stack",
"deployment",
"server"
],
"type": "string"
},
"Target": {
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
},
"kind": {
"$ref": "#/$defs/ResourceKind"
}
},
"required": [
"kind",
"id"
],
"type": "object"
}
}
}Output
The registered output schema covers structured results and tool errors.
DeletionResultcleanup_updates,coverage,definition_removal,effects,evidence_gaps,known_workloads,observation_errors,outcome,preview_id,resource,runtime_cleanup_fully_verified,visible_references,writes_submittedAppErrorcandidates,correction,field,kind,message,operation,status
Show output JSON Schema
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"anyOf": [
{
"$ref": "#/$defs/DeletionResult"
},
{
"$ref": "#/$defs/AppError"
}
],
"$defs": {
"AppError": {
"additionalProperties": false,
"description": "Only application-owned messages and selected, nonsensitive metadata survive.",
"properties": {
"candidates": {
"items": {
"$ref": "#/$defs/Candidate"
},
"type": [
"array",
"null"
]
},
"correction": {
"type": [
"string",
"null"
]
},
"field": {
"type": [
"string",
"null"
]
},
"kind": {
"$ref": "#/$defs/ErrorKind"
},
"message": {
"type": "string"
},
"operation": {
"type": "string"
},
"status": {
"format": "uint16",
"maximum": 65535,
"minimum": 0,
"type": [
"integer",
"null"
]
}
},
"required": [
"kind",
"message",
"operation"
],
"type": "object"
},
"Candidate": {
"additionalProperties": false,
"description": "A bounded ambiguity hint, never a raw upstream resource.",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"CleanupUpdate": {
"properties": {
"attribution": {
"type": "string"
},
"error": {
"anyOf": [
{
"$ref": "#/$defs/AppError"
},
{
"type": "null"
}
]
},
"failed_or_skipped_stages": {
"items": {
"type": "string"
},
"type": "array"
},
"id": {
"type": "string"
},
"reported_cleanup": {
"type": "string"
}
},
"required": [
"id",
"attribution",
"reported_cleanup",
"failed_or_skipped_stages",
"error"
],
"type": "object"
},
"Coverage": {
"properties": {
"error": {
"anyOf": [
{
"$ref": "#/$defs/AppError"
},
{
"type": "null"
}
]
},
"family": {
"type": "string"
},
"hidden_records_possible": {
"type": "boolean"
},
"visible_records_examined": {
"format": "uint",
"minimum": 0,
"type": "integer"
},
"visible_scan_complete": {
"type": "boolean"
}
},
"required": [
"family",
"visible_records_examined",
"visible_scan_complete",
"hidden_records_possible",
"error"
],
"type": "object"
},
"DefinitionRemoval": {
"properties": {
"error": {
"anyOf": [
{
"$ref": "#/$defs/AppError"
},
{
"type": "null"
}
]
},
"observation": {
"type": "string"
},
"reported_by_core": {
"type": "boolean"
}
},
"required": [
"reported_by_core",
"observation",
"error"
],
"type": "object"
},
"DeletionResult": {
"properties": {
"cleanup_updates": {
"items": {
"$ref": "#/$defs/CleanupUpdate"
},
"type": "array"
},
"coverage": {
"items": {
"$ref": "#/$defs/Coverage"
},
"type": "array"
},
"definition_removal": {
"$ref": "#/$defs/DefinitionRemoval"
},
"effects": {
"items": {
"type": "string"
},
"type": "array"
},
"evidence_gaps": {
"items": {
"type": "string"
},
"type": "array"
},
"known_workloads": {
"items": {
"$ref": "#/$defs/Workload"
},
"type": "array"
},
"observation_errors": {
"items": {
"$ref": "#/$defs/AppError"
},
"type": "array"
},
"outcome": {
"$ref": "#/$defs/Outcome"
},
"preview_id": {
"type": [
"string",
"null"
]
},
"resource": {
"$ref": "#/$defs/ResourceSummary"
},
"runtime_cleanup_fully_verified": {
"type": "boolean"
},
"visible_references": {
"items": {
"$ref": "#/$defs/Reference"
},
"type": "array"
},
"writes_submitted": {
"format": "uint8",
"maximum": 255,
"minimum": 0,
"type": "integer"
}
},
"required": [
"outcome",
"resource",
"preview_id",
"writes_submitted",
"definition_removal",
"known_workloads",
"runtime_cleanup_fully_verified",
"visible_references",
"coverage",
"cleanup_updates",
"effects",
"evidence_gaps",
"observation_errors"
],
"type": "object"
},
"ErrorKind": {
"description": "Stable public categories. No variant contains a raw upstream error.",
"enum": [
"invalid_arguments",
"not_found",
"ambiguous_target",
"incomplete_resolution",
"configuration",
"authentication",
"permission_denied",
"timeout",
"unreachable",
"upstream",
"invalid_response",
"response_too_large",
"capability_disabled",
"unsupported_target",
"stale_preview",
"invalid_preview"
],
"type": "string"
},
"Outcome": {
"enum": [
"preview",
"acknowledged",
"submission_unknown"
],
"type": "string"
},
"Reference": {
"properties": {
"after": {
"type": [
"string",
"null"
]
},
"error": {
"anyOf": [
{
"$ref": "#/$defs/AppError"
},
{
"type": "null"
}
]
},
"expected_effect": {
"type": "string"
},
"field": {
"description": "The exact structured reference Core may detach, or may leave dangling.",
"type": "string"
},
"id": {
"type": "string"
},
"kind": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"kind",
"id",
"name",
"field",
"expected_effect",
"after",
"error"
],
"type": "object"
},
"ResourceKind": {
"enum": [
"stack",
"deployment",
"server"
],
"type": "string"
},
"ResourceSummary": {
"properties": {
"id": {
"type": "string"
},
"kind": {
"$ref": "#/$defs/ResourceKind"
},
"name": {
"type": "string"
}
},
"required": [
"kind",
"id",
"name"
],
"type": "object"
},
"Workload": {
"properties": {
"after_state": {
"type": [
"string",
"null"
]
},
"container_id": {
"type": "string"
},
"error": {
"anyOf": [
{
"$ref": "#/$defs/AppError"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"observation": {
"type": "string"
},
"server_id": {
"type": "string"
},
"state_before": {
"type": "string"
}
},
"required": [
"server_id",
"container_id",
"name",
"state_before",
"observation",
"after_state",
"error"
],
"type": "object"
}
}
}