Skip to main content
Glama

batch_top_resources

Monitor Kubernetes resource usage by fetching CPU and memory metrics for multiple nodes and pods at once.

Instructions

批量查看 Node/Pod 的 CPU、内存使用(类似 kubectl top)

Args: resource_types: 资源类型,JSON 数组如 ["nodes","pods"] 或 "nodes" 或 "pods" namespace: 命名空间(仅对 pods 有效) kubeconfig_path: kubeconfig 文件路径,不指定则使用 cluster_name 或默认集群 cluster_name: 集群配置名称(clusters.json 中的 name),kubeconfig_path 未指定时使用

Returns: nodes 和/或 pods 的 CPU、内存使用数据。依赖集群已部署 metrics-server。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namespaceNodefault
cluster_nameNo
resource_typesYes
kubeconfig_pathNo
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses key behavioral traits: the dependency on metrics-server ('依赖集群已部署 metrics-server'), the fallback logic for kubeconfig_path (if not specified, uses cluster_name or default cluster), and the namespace constraint ('仅对 pods 有效'). These add valuable context beyond the schema and imply a read-only operation.

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

Conciseness5/5

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

The description is concise and well-structured: a one-line summary followed by clearly labeled Args and Returns sections. Each sentence contributes necessary information without redundancy. It is appropriately sized for the tool's complexity.

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

Completeness4/5

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

For a read-only metrics tool with no annotations or output schema, the description covers the essential aspects: purpose, all parameters, return data, and a critical dependency. It lacks details on return data structure or error handling, but these are less critical for this simple batch query. Overall, it is complete enough for an agent to use correctly.

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

Parameters5/5

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

Schema description coverage is 0%, but the description compensates fully by explaining every parameter: resource_types (with JSON format examples), namespace (with pod-only constraint), kubeconfig_path (with fallback behavior), and cluster_name (with source and precedence). This adds significant meaning beyond the bare schema fields, making it easy for an agent to construct valid inputs.

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?

The description clearly states the tool's function: '批量查看 Node/Pod 的 CPU、内存使用' (batch view CPU/memory usage of Node/Pod), which is a specific verb+resource combination. It distinguishes itself from siblings like get_cluster_resource_usage by focusing on batch node/pod-level metrics, similar to kubectl top. This is unambiguous and specific.

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?

The description implies usage context via '类似 kubectl top' and parameter constraints, but it does not explicitly state when to use this tool versus alternatives like get_cluster_resource_usage. It lacks explicit exclusions or alternative mentions, but the context is reasonably clear. This earns a 3 for implied usage without explicit guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Tobewont/k8s-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server