Skip to main content
Glama

Get any resource

get_resource
Read-onlyIdempotent

Read any Kubernetes object by apiVersion, kind, and name to inspect cluster resources while redacting Secret values and masking credential-shaped env values and ConfigMap entries.

Instructions

Read an arbitrary Kubernetes object by apiVersion/kind/name (e.g. apiVersion=apps/v1, kind=Deployment). Secret values are always redacted; credential-shaped env values and ConfigMap entries are masked.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "apiVersion": "<apiVersion>",
      "kind": "<kind>",
      "name": "<name>"
    },
    "name": "get_resource"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindYese.g. Pod, Deployment, Ingress
nameYesResource name
contextNokube-config context to target (defaults to current-context)
namespaceNoNamespace (omit for cluster-scoped resources)
apiVersionYese.g. v1, apps/v1, networking.k8s.io/v1

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.1
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and openWorld, so the safety profile is covered. The description adds genuinely new behavioral information: Secret values are always redacted and credential-shaped env/ConfigMap values are masked, which tells an agent the returned manifest is lossy. It does not mention error behavior for missing objects or how failures surface.

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?

One sentence establishing the operation and identifier scheme, one sentence disclosing the redaction caveat. Zero filler, and the core purpose is front-loaded.

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?

With no output schema, the description carries the burden of describing the return payload; it discloses the important redaction/masking caveat but does not state that the full manifest is returned or how not-found errors appear. Given annotations plus full schema coverage, this is sufficient for correct invocation.

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 five parameters are already documented, and the description's examples (apiVersion=apps/v1, kind=Deployment) largely restate the schema's own examples. It adds no guidance on namespace versus cluster-scoped omission or on context selection, so it stays at the baseline.

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 ('Read an arbitrary Kubernetes object') plus the exact identifier triple (apiVersion/kind/name) and a concrete example. It clearly distinguishes itself as the generic getter versus the typed siblings like get_pod or list_deployments, though it never says so explicitly.

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 word 'arbitrary' implies this is the fallback for any kind not covered by a dedicated getter, and the required identifier triple implies the caller must already know the object's apiVersion/kind/name. There is no explicit when-to-use versus get_pod/get_pod_logs guidance and no stated prerequisites such as needing discovery first.

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