Skip to main content
Glama

batch_delete_resources

Deletes multiple Kubernetes resources in a namespace after backing up their original YAML; the write is aborted if backup fails, preventing accidental data loss.

Instructions

批量删除资源。删除前备份资源原样 YAML,备份失败则中止写操作。

Args: resources: JSON格式的资源列表 namespace: 命名空间 grace_period_seconds: 优雅删除等待时间 kubeconfig_path: kubeconfig 文件路径,不指定则使用 cluster_name 或默认集群 cluster_name: 集群配置名称(clusters.json 中的 name),kubeconfig_path 未指定时使用

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": {
      "resources": "<resources>"
    },
    "name": "batch_delete_resources"
  }
}

Input Schema

NameRequiredDescriptionDefault
namespaceNodefault
resourcesYes
cluster_nameNo
kubeconfig_pathNo
grace_period_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden, and it does disclose one important behavior beyond the obvious: original YAML is backed up before deletion and the write is aborted if backup fails. However, it says nothing about whether deletion is recoverable/restorable from that backup, what permissions are required, or how partial failures across the batch are reported.

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 core behavior and the abort-on-backup-failure rule are front-loaded in the first sentence, followed by a compact Args block. The wording is efficient overall, though the docstring-style parameter list is somewhat redundant with the schema titles.

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

Completeness3/5

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

For a destructive five-parameter operation with no annotations and no output schema, the definition covers the parameters and the backup-safety contract but omits the return/result shape, partial-failure semantics, and any note on whether the deletion is destructive or reversible. Adequate for correct invocation, incomplete for understanding consequences.

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 description coverage is 0%, so the description must compensate, and it does: all five parameters are explained, including that resources is a JSON-formatted string rather than a native array, that grace_period_seconds is the graceful-deletion wait, and the fallback chain from kubeconfig_path to cluster_name to the default cluster. It falls short of describing the expected JSON structure of the resources list.

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?

The description opens with a specific verb+resource (批量删除资源) that unambiguously identifies a bulk-delete operation, and it adds the key precondition that a YAML backup is taken first. It does not explicitly contrast itself with sibling delete tools such as delete_cluster, but the batch/namespace scope makes the purpose clear enough to select it.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance, and no alternatives are named (e.g., single-resource delete vs. this batch variant). The only conditional logic given is internal to the operation: a backup failure aborts the write, which is behavioral, not selection guidance.

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