Skip to main content
Glama

k8s_inventory

Generate a one-shot cluster snapshot returning resource summaries or overview counts per namespace, excluding pod details and optionally including metadata-only ConfigMaps/Secrets and Istio CRDs.

Instructions

⭐ One-shot comprehensive cluster snapshot. Use for documentation, audits, or any task that needs broad visibility — replaces ~50 individual k8s_get calls.

Read-only: fans out many kubectl get -o json calls only — never mutates the cluster, idempotent. Requires broad read access (or read on the given namespace); kinds that are Forbidden/absent are skipped silently rather than failing the whole call. Pods are excluded from the payload (counts only).

Modes:

  • "full" (default): expand each namespaced item to its summarized form (deployment images, service ports, etc.). Use for documentation or audits.

  • "overview": skip per-item expansion. Each namespace entry carries only a by_kind_counts map. ~10-20× smaller payload. Use to scan cluster shape before drilling in with namespace-scoped follow-up calls.

By default, ConfigMap and Secret lists are EXCLUDED — they are typically the largest noise-to-signal source in cluster-wide inventories. Set include_config_resources=True to include them in by_kind_counts and the per-namespace breakdown. ConfigMap data and Secret values are NEVER returned — only metadata.

Pods are NOT included in the snapshot (potentially huge); only per-namespace pod counts are surfaced. Use k8s_triage for pod health, k8s_get pod for specifics.

Istio CRDs (Gateway / VirtualService / DestinationRule) are auto-included when present; absent CRDs are silently skipped. Set include_istio=False to skip.

Args: namespace: Limit scope to a single namespace; omit for cluster-wide. mode: "full" (default, expand items) or "overview" (counts only). include_config_resources: Include ConfigMaps and Secrets (default False). include_istio: Auto-detect and include Istio CRDs (default True). context: kubeconfig context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoDetail level. "full" (default) expands each item to summarized fields; "overview" returns per-namespace by_kind_counts only (~10-20× smaller). Only these two values are accepted.full
contextNokubeconfig context name; omit to use the current context.
namespaceNoLimit the snapshot to one namespace; omit for a cluster-wide snapshot.
include_istioNoAuto-detect and include Istio CRDs (Gateway/VirtualService/DestinationRule) when present. Default true; absent CRDs are skipped.
include_config_resourcesNoInclude ConfigMaps and Secrets in counts and per-namespace breakdown. Default false (they are the biggest noise source). Values are NEVER returned either way — metadata only.
Behavior5/5

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

With no annotations, the description fully discloses read-only behavior, idempotency, silent skipping of forbidden/absent resources, exclusion of pods (counts only), and that ConfigMap/Secret values are never returned.

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?

Well-structured with clear sections, front-loaded with purpose and key constraints. Slightly verbose but every sentence contributes; minor redundancy could be trimmed.

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 complex 5-parameter tool with no output schema, the description covers all relevant behavioral details, modes, exclusions, defaults, and edge cases, making it complete for effective agent use.

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 coverage is 100%, and the description adds significant value: explains mode payload sizes, reasons for default exclusion of config resources, and behavior of Istio auto-detection, all beyond basic schema descriptions.

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 it is a 'One-shot comprehensive cluster snapshot' for documentation/audits, and explicitly differentiates from sibling tools like k8s_triage (pod health) and k8s_get (specifics).

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?

Provides explicit when-to-use (broad visibility, audits) and when-not (pod specifics), includes mode guidance ('full' vs 'overview'), and references specific alternatives (k8s_triage, k8s_get).

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/kaka-milan-22/kops'

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