Skip to main content
Glama
BenedatLLC

Kubernetes Tools MCP Server

by BenedatLLC

get_cluster_info

Report which Kubernetes cluster these tools are bound to, so you can verify the data's source when multiple clusters are involved.

Instructions

Report which Kubernetes cluster these tools are bound to. Call this first when more than one cluster could be involved, and before drawing conclusions that depend on which cluster the data came from.

The binding is made once (at server startup, or on the first tool call) and
shared by every tool, so all tools answer from this cluster.

Parameters
----------
None
    This function does not take any parameters.

Returns
-------
ClusterInfo
    An object with the following fields:

    source : str
        "kubeconfig" (bound through a kubeconfig context), "in-cluster" (the
        service account of the pod the server runs in), or "capture" (a
        recorded snapshot of a cluster being replayed, not a live cluster).
    context : Optional[str]
        The kubeconfig context name. None for in-cluster config, and for a
        capture that did not record one.
    server : Optional[str]
        URL of the cluster's API server.
    kubeconfig : Optional[str]
        Path of the kubeconfig file (or ``:``-separated list of files) the
        binding was read from. None unless source is "kubeconfig".
    server_version : Optional[str]
        Kubernetes version reported by the API server, e.g. "v1.31.2". None if
        the server could not be reached, or the capture did not record it.
    captured_at : Optional[datetime.datetime]
        For a capture, when it was taken; every age and timestamp the tools
        return is relative to that moment. None for a live cluster.

Raises
------
K8sConfigError
    If no cluster configuration can be loaded.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
serverNo
sourceYes
contextNo
kubeconfigNo
captured_atNo
server_versionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.1.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses that the binding happens once at startup or first call and is shared across all tools (a non-obvious global state semantic), enumerates the meaning of each source value including the non-live "capture" case, and documents the K8sConfigError failure mode.

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

Conciseness3/5

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

The opening purpose and usage guidance are well front-loaded, but the numpydoc Returns section is long and largely duplicates the existing output schema. Roughly half the text restates structured data rather than adding value, hurting conciseness.

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?

For a zero-parameter introspection tool, everything needed is present: purpose, when to call it, the global binding semantics, error conditions, and the special meaning of capture timestamps. Output schema coverage means field duplication is harmless rather than a gap.

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?

Zero parameters, so baseline is 4. The description confirms "This function does not take any parameters," which matches the empty input schema, but there is no parameter meaning to add.

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?

States a specific verb and resource: "Report which Kubernetes cluster these tools are bound to." This is a metadata/introspection tool that is clearly distinct from all sibling data-retrieval tools (pods, nodes, logs), so an agent can place it instantly.

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?

Gives an explicit trigger condition: call first "when more than one cluster could be involved, and before drawing conclusions that depend on which cluster the data came from." No alternative tool exists for this purpose, so naming a sibling alternative is unnecessary; the when-to-use directive is unambiguous.

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