Skip to main content
Glama

Get resource

k8s_get_resource
Read-onlyIdempotent

Read any Kubernetes object by API version and kind, including CRDs; secret values are redacted unless reveal is true, with a dataDigest to detect changes.

Instructions

Read any object by apiVersion and kind (CRDs included).

Secret values are redacted unless reveal is true; the redacted body keeps the key names and a dataDigest that changes when any value changes.

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": {
      "api_version": "<api_version>",
      "kind": "<kind>",
      "name": "<name>"
    },
    "name": "k8s_get_resource"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindYes
nameYes
revealNo
contextNoNamed context of the multi-context pool to run against (see cm_multi_context list_contexts); the default context if omitted.
namespaceNo
api_versionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.4.2

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, so the safety profile is covered. The description adds genuinely non-derivable behavior: secret values are redacted by default, the redacted body preserves key names, and a `dataDigest` changes when any value changes — which is exactly what an agent needs to decide whether to set `reveal`. It does not say what happens for a missing object or whether non-secret fields are ever withheld.

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?

Two short sentences, front-loaded with the core capability and followed by the one behavior that actually changes how an agent calls the tool. No filler or restated title, though the redaction sentence could be tightened slightly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and 17% parameter coverage across six parameters, the description should say more about the returned shape (is it the full manifest? a summary?) and about not-found/error behavior. What it does cover — redaction and digest — is the highest-value gap, but namespace and name handling remain undescribed.

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 only 17%, so the description must carry more weight; it explains `reveal` semantics well and covers the apiVersion/kind pair, but says nothing about `name` (required but unexplained), `namespace` (nullable, default null — presumably all namespaces or the context default), or how the object is identified when names collide across namespaces. Partial compensation for a low-coverage schema.

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 gives a specific verb ('Read') and resource ('any object by apiVersion and kind'), plus an explicit scope expander ('CRDs included') that tells the agent this is the generic getter rather than a typed one. It never names a sibling it displaces (e.g. k8s_get_secret for secrets or k8s_describe_api_resource for discovery), so differentiation is inferred rather than stated.

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?

Usage is implied by 'Read any object', suggesting this is the fallback when no typed getter exists, but there is no explicit when-to-use or when-not-to-use guidance and no mention of alternatives. The `reveal` sentence hints at a conditional workflow (secrets are redacted by default) without stating when revealing is appropriate or safe.

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

Deploy Server

Other Tools