Skip to content

apply_resource_delete

Deliberately apply the exact resource kind/stable ID, action=delete and preview_id once. BOTH configuration-edit and operate must be enabled; discovery and direct dispatch are disabled without either. Revalidate raw definition, deployed cleanup identity, attachment, relevant runtime, history and visible reference effects before one typed delete. Core requires Write and can remove containers/services/stacks before deleting the definition. No bulk selection, separate MCP execution, provisioning, retry or credential fallback. Keep acknowledgement, direct definition observation, fresh known-container inspection, visible reference after-state and cleanup-update candidates/errors separate. Core can hide history after removing resource permissions; successful update flags or missing cache data do not prove cleanup. Core archives secret-bearing Deleted Toml; MCP never returns that stdout. Final-read/write races remain. Lost/invalid/oversized/mismatched responses retain submission_unknown; never automatically repeat deletion.

Availability

KOMODO_ALLOW_OPERATE=true and KOMODO_ALLOW_CONFIGURATION_EDIT=true

The instance’s tool selection and upstream Core permissions also apply. Some inputs require additional grants.

Effect annotations

  • readOnlyHint — false
  • destructiveHint — true
  • idempotentHint — 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
preview_id
Required · type "string"
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"
    },
    "preview_id": {
      "type": "string"
    },
    "target": {
      "$ref": "#/$defs/Target"
    }
  },
  "required": [
    "target",
    "action",
    "preview_id"
  ],
  "$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.

DeletionResult
cleanup_updates, coverage, definition_removal, effects, evidence_gaps, known_workloads, observation_errors, outcome, preview_id, resource, runtime_cleanup_fully_verified, visible_references, writes_submitted
AppError
candidates, 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"
    }
  }
}

Operator guides

All built-in tools