Skip to main content
Glama

get_cluster_resource_usage

Get a Kubernetes cluster resource usage report for all or a specific namespace. Specify kubeconfig or cluster name to target the right cluster and identify resource consumption.

Instructions

获取集群资源使用情况

Args: namespace: Kubernetes命名空间,"all"表示所有命名空间,默认为"all" kubeconfig_path: kubeconfig 文件路径,不指定则使用 cluster_name 或默认集群 cluster_name: 集群配置名称(clusters.json 中的 name),kubeconfig_path 未指定时使用

Returns: 集群资源使用情况报告。pod_resources 超过 50 条时会截断,返回 truncated 和 total_count 说明

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namespaceNoall
cluster_nameNo
kubeconfig_pathNo
Behavior3/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 one meaningful behavioral trait: pod_resources exceeding 50 entries will be truncated, returning truncated and total_count. However, it omits other behavioral details such as whether the operation requires special permissions, what happens on error, or whether it is strictly read-only beyond the 'get' connotation. There is no contradiction with annotations (none provided).

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 with clear Args and Returns sections. Every line earns its place, providing essential parameter explanations and return behavior 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?

Given no output schema and no annotations, the description explains the return report and truncation behavior, which is helpful. It also fully documents parameters. However, it does not describe what the resource usage report includes (e.g., CPU, memory, pod-level metrics) or outline the report structure. Still, for a straightforward read-only tool with optional params, the provided context is largely sufficient for an agent to invoke and interpret basic results.

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?

The input schema has zero description coverage, but the description compensates thoroughly. It explains each parameter: namespace meaning and default, kubeconfig_path precedence, and cluster_name usage when kubeconfig_path is omitted. It also clarifies the relationship between cluster_name and kubeconfig_path, adding significant meaning beyond the schema's bare titles and defaults.

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 clearly states '获取集群资源使用情况' (get cluster resource usage), specifying a specific verb and resource. It distinguishes from most siblings like get_pod_logs and get_cluster_info, but does not explicitly differentiate from batch_top_resources, which might also list resource usage. Therefore it lacks explicit sibling differentiation.

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 provided on when to use this tool versus alternatives, nor any prerequisites or conditions. The description only explains parameters and return behavior, not usage context. It neither states exclusions nor alternative tool references.

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