Skip to main content
Glama

Delete persistent volumes

delete_persistent_volumes
Destructive

Delete PersistentVolumes no claim uses: each named volume must be Released or Available, and no PersistentVolumeClaim may still be bound to it (a Bound volume is refused naming its claim). Up to 20 volumes per call. The cluster's volumes and claims are read live first; if they cannot be read the call is refused with a 'Not checked' line. The confirmation card lists each volume's size, age, StorageClass, reclaim policy and backing volume (CSI driver and volume handle, or the in-tree source), and what happens to its data. Before deleting, each CSI volume is snapshotted when the cluster can (the snapshot CRDs are installed and a VolumeSnapshotClass exists for its driver): a VolumeSnapshotContent naming the volume handle (deletionPolicy Retain) and a VolumeSnapshot in namespace default, labelled ankra.io/deleted-volume=, ankra.io/source-cluster and ankra.io/snapshot-time, never deleted automatically. The volume is deleted only once its snapshot is ready (bounded wait of 5 minutes); a snapshot that fails or is not ready leaves its volume in place, and calling again reuses a snapshot that became ready. The result names each snapshot and how to restore it (a PVC whose dataSource is the VolumeSnapshot). A volume no snapshot can be taken of (no CSI source, no snapshot API, or no VolumeSnapshotClass for its driver) is still deletable, and the card and result say for it: 'no snapshot possible: the data on this volume is deleted permanently'. If the data may be needed, take a restore point first with create_stack_restore_point on the stack that used the claim (list_restore_points shows existing ones). Not reversible. Each volume is re-checked unattached right before its delete. Find candidates with describe_resources on kind PersistentVolume (status.phase Released or Available). A person can delete any volume in the Ankra UI or with ankra cluster delete pv <name>. Requires kubernetes.write.

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": {
      "names": "<names>",
      "cluster_id": "<cluster_id>"
    },
    "name": "delete_persistent_volumes"
  }
}

Input Schema

NameRequiredDescriptionDefault
namesYesExact names of the PersistentVolumes to delete (1 to 20).
cluster_idYesAnkra cluster id (UUID) the call targets. Discover ids with list_clusters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, and the description goes far beyond: live read precondition and refusal mode ('Not checked'), per-volume re-check before delete, snapshot-before-delete with bounded 5-minute wait, retry reuse of ready snapshots, retained VolumeSnapshotContent never auto-deleted, explicit permanent-data-loss message for non-snapshottable volumes, and the kubernetes.write permission requirement.

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 single dense paragraph is front-loaded with the eligibility gate and never buries the destructive warning, but it is long and a few statements are near-duplicates ('Not reversible' / 'the data on this volume is deleted permanently'). Structuring the snapshot behaviour and refusal modes as separate sentences would scan faster.

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?

No output schema exists, yet the description still describes what the confirmation card and result contain (size, age, StorageClass, reclaim policy, backing CSI driver/volume handle) and how to restore from the resulting snapshot. Combined with 100% schema coverage and full annotations, nothing an agent needs to call this 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% and the schema already states 1-20 names, so the baseline is 3. The description adds genuine meaning beyond it: each name must be a Released or Available volume with no bound claim, and it names the refusal behaviour for Bound volumes — semantics the schema cannot express.

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

Purpose5/5

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

Opens with a specific verb+resource plus the exact eligibility gate ('each named volume must be Released or Available'), which distinguishes it from generic deletion siblings like delete_resource. An agent knows immediately what this deletes and under what conditions.

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

Usage Guidelines5/5

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

Explicitly routes the agent: find candidates with describe_resources on kind PersistentVolume (phase Released/Available), and if the data may be needed use create_stack_restore_point on the stack that used the claim, with list_restore_points to enumerate existing ones. It also notes the human/CLI equivalent, so alternatives are covered.

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.