Skip to main content
Glama

Delete resource

delete_resource
Destructive

Delete any Kubernetes resource, including cluster-scoped kinds and custom resources defined by CRDs in the cluster snapshot. Safety checks refuse deletes of protected kinds and namespaces, ArgoCD-managed or stack-owned resources, protected RBAC objects, and attached PersistentVolumes — with allow_bypass=true (only when the user explicitly asked for the deletion) every check is lifted and the delete still requires the user's confirmation. Objects owned by a Helm release are additionally checked against that release's live state: while the release is live the delete is refused until acknowledge_live_release names that specific release — allow_bypass never lifts this check.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "kind": "<kind>",
      "name": "<name>",
      "cluster_id": "<cluster_id>"
    },
    "name": "delete_resource"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindYesResource kind (e.g., 'ConfigMap', 'Secret', 'Service'). For custom resources use the Kind from the cluster snapshot CRD index (e.g. 'Application', 'IngressRoute').
nameYesResource name to delete.
dry_runNoIf true, preview the change without executing it.
namespaceNoKubernetes namespace (not required for cluster-scoped resources).
cluster_idYesAnkra cluster id (UUID) the call targets. Discover ids with list_clusters.
api_versionNoAPI version (e.g., 'v1', 'apps/v1', or '<group>/<version>' for custom resources from the snapshot CRD index).v1
allow_bypassNoBypass every delete safety check (protected kind/namespace denylists, ArgoCD-managed and stack-owned guards, protected RBAC and attached-volume checks) except the live-Helm-release guard. Set ONLY when the user explicitly asked for this deletion (e.g. 'delete the argocd namespace', 'force', 'bypass'). The confirmation dialog still appears with an enhanced warning and nothing is deleted until the user approves.
acknowledge_live_releaseNoName of the live Helm release (or '<namespace>/<name>') whose ownership of this object the user explicitly acknowledged. Set ONLY after a delete was refused with type='helm_live_release' and the user confirmed deleting an object owned by that specific live release — allow_bypass does not lift this guard. The confirmation dialog still appears with an enhanced warning.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the destructiveHint=true annotation by enumerating exactly what is protected (protected kinds/namespaces, ArgoCD-managed, stack-owned, RBAC objects, attached PVs), how bypass interacts with those checks, and that a confirmation prompt still gates execution. It also discloses the non-obvious rule that allow_bypass does not lift the live-Helm-release guard, which is precisely the kind of sequencing behavior an agent cannot derive from annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The capability statement is front-loaded and the safety model follows in a coherent order. It is a dense single paragraph with some overlap with the schema's own parameter descriptions, but no sentence is filler for a destructive operation of this complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, 8-parameter tool with no output schema, the description covers the guard chain, the bypass contract, the user-confirmation requirement, and the one exception that bypass cannot clear. Nothing an agent needs in order to call it safely is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns an extra point by describing the cross-parameter workflow — the live-release refusal type that must precede acknowledge_live_release and the fact that bypass cannot override it. The remaining params (kind, name, namespace, api_version, dry_run) are not elaborated, but the schema already documents them fully.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Delete any Kubernetes resource') and broadens the scope explicitly to cluster-scoped kinds and CRD-defined custom resources. It never distinguishes itself from sibling delete tools such as delete_pod, delete_secret, or delete_persistent_volumes, so an agent must infer that this is the general-purpose path.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage guidance is limited to conditional instructions for allow_bypass ('only when the user explicitly asked') and acknowledge_live_release ('only after a delete was refused'). There is no statement of when to prefer this tool over the narrower delete siblings, so tool selection is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.