Skip to main content
Glama

Kubectl get resources

kube_get
Read-only

Retrieve Kubernetes resources as structured JSON, with compact summaries by default and jq filters to extract specific fields from raw kubectl output.

Instructions

Get Kubernetes resources as structured data. Wraps kubectl get -o json and returns a compact summary by default. Use the jq param to extract specific fields from the raw JSON (e.g. '.spec.template.spec.containers[].env') instead of the summary.

Input Schema

NameRequiredDescriptionDefault
jqNojq filter applied to raw kubectl JSON. Skips the default summary and returns the jq result instead. Example: '.spec.template.spec.containers[].env'
nameNoSpecific resource name
contextNoKube context
maxItemsNoItem cap; overrides detailLevel
resourceNoRequired. Resource type (e.g. pods, deployments, services, nodes)
selectorNoLabel selector (e.g. 'app=nginx')
namespaceNoNamespace (omit for all-namespaces or cluster-scoped)
includeRawNoInclude raw/verbose fields
detailLevelNoItem preset: summary 20, normal 100, full (default; also skips the response budget)
allNamespacesNoSearch all namespaces (overrides namespace)
includeLabelsNoInclude each resource's labels (default false — labels are verbose and mostly hashes; use selector to filter or jq to read specific ones)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.0.1

TDQS

A3.8/5.0
Behavior4/5

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

Annotations only declare readOnlyHint, so the description does real work: it discloses that output is a compact summary by default, that jq skips the summary and returns raw results, and that kubectl JSON underlies it. It doesn't cover auth/context requirements or failure behavior, keeping it below a 5.

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?

Three sentences, front-loaded with the core capability, followed by output-shaping behavior and the single most important routing tip. No filler.

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 an 11-parameter read-only query tool with no output schema, the description covers purpose, default output shape, and the jq escape hatch, which are the essentials. Interaction between detailLevel, maxItems, and includeRaw is left entirely to the schema, but that is acceptable given full coverage there.

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 100%, so all 11 parameters are already documented in structured fields, including the jq example. The description's jq explanation largely restates the schema, establishing the baseline 3 rather than adding new semantics.

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?

States a specific verb and resource ('Get Kubernetes resources') and clarifies the mechanism ('Wraps kubectl get -o json'). It does not differentiate itself from specialized siblings like kube_deployment_status or kube_pod_failure_summary, which an agent must infer from the generic naming.

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?

It gives one clear routing rule: use the jq param instead of the summary when extracting specific fields. However, it never says when to prefer the generic kube_get over the many specialized kube_* siblings, nor when the standalone jq sibling would be more appropriate.

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