Skip to main content
Glama

List resources

list_resources
Read-onlyIdempotent

List resources in OpenShift/Kubernetes clusters by kind, namespace, or label selector. Returns raw lists with secret values redacted.

Instructions

List resources of a kind, optionally in a namespace and filtered by a label selector. Returns the raw Kubernetes/OpenShift list (secret values are redacted). Works for core and OpenShift kinds (pods, deployments, deploymentconfigs, routes, services, builds, imagestreams, …).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYesResource kind — e.g. pod, deployment, deploymentconfig, service, route, configmap, secret, build, buildconfig, imagestream, statefulset, daemonset, job, cronjob, pvc, node, project. Singular or plural accepted.
limitNoMax items (capped by OPENSHIFT_MAX_RESULTS)
namespaceNoNamespace / project. Required for namespaced kinds; omit for cluster-scoped.
label_selectorNoLabel selector, e.g. app=web,tier!=cache

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive behavior. The description adds valuable context beyond those: it returns the raw Kubernetes/OpenShift list, redacts secret values, and supports both core and OpenShift kinds. It does not over-claim or contradict the annotations.

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 compact sentences, each earning its place: the first gives the core action and filters, the second states the return shape and redaction behavior, and the third lists supported kinds with examples. The most decision-relevant information 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?

For a moderate 4-parameter tool with no output schema, the description covers the return shape, redaction, and scope of supported kinds. It is not exhaustive about error cases or authentication, but the schema and annotations fill the remaining gaps, so only the lack of explicit sibling routing keeps this from a 5.

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 the schema already documents kind, limit, namespace, and label_selector with examples and constraints. The description adds only general context about kinds and raw output, which is not parameter-specific, so it meets the baseline without materially extending schema meaning.

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 ('List resources of a kind') with optional namespace and label-selector scoping. It clearly distinguishes itself from siblings like get_resource (single resource) and list_projects (specific kind) by covering any core/OpenShift kind and returning a raw list.

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 description implies when to use it: when you need a list of resources of a kind, optionally scoped by namespace or label selector. However, it does not explicitly contrast with get_resource, pod_logs, list_events, or list_projects, so an agent must infer the selection criteria from sibling names alone.

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