Skip to main content
Glama

batch_update_resources

Updates multiple Kubernetes resources in a batch, backs up each original YAML before changes, and stops the write if backup fails.

Instructions

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

Args: resources: JSON格式的资源列表 namespace: 命名空间 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_update_resources"
  }
}

Input Schema

NameRequiredDescriptionDefault
namespaceNodefault
resourcesYes
cluster_nameNo
kubeconfig_pathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior3/5

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

Because there are no annotations, the description must carry the full behavioral burden, and it does disclose one genuinely important trait: original YAML is backed up before any change, and the write aborts if backup fails. Beyond that, though, it says nothing about permissions required, whether the update is atomic or merges partial results, or what happens when some resources in the batch fail, which matters a lot for a mutation tool.

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 structure front-loads the purpose and the safety behavior, then lists arguments, and there is no filler. The Args block partially repeats the schema's property names, but each line does add meaning, such as the default namespace and the kubeconfig precedence.

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 4-parameter batch mutation tool with no annotations and no output schema, the description covers the critical backup-first safety behavior and parameter meaning. It is still incomplete: there is no return-value description, no partial-failure semantics, and no indication of the per-resource payload structure, all of which an agent needs to invoke this correctly.

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

Parameters3/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 define each of the 4 parameters and explain the precedence between kubeconfig_path and cluster_name. However, 'resources: JSON-formatted resource list' never says what shape each resource takes, such as kind, name, or manifest, which is the single most important thing an agent needs before calling this tool.

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 and resource: 'batch update resources', which an agent can separate from the create, delete, and describe siblings based on the verb alone. It never explicitly contrasts itself with those siblings, so it falls short of a 5, but the operation itself is unambiguous.

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?

No guidance is given on when to use this tool instead of batch_create_resources, batch_delete_resources, or restore_from_backup, and no prerequisites are stated. The agent must infer from the verb 'update' that this only applies to resources that already exist, and nothing tells it what happens when a named resource is missing.

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