Skip to main content
Glama

Get Namespace Resource Inventory

get_namespace_resources
Read-onlyIdempotent

Fetch a flat inventory of all core resources in one Kubernetes namespace in a single call, including pods, services, configmaps, secrets metadata, gateways, HTTPRoutes, PVCs, and service accounts.

Instructions

Fetch a flat tabular inventory of all core resources in one namespace in a single call.

Returns cluster_id, namespace, and separate lists for pods, services, configmaps, secrets (metadata only: name, type, and key names — secret values are never decoded), gateways, httproutes, pvcs, and serviceaccounts. Large namespaces may return sizable payloads.

Use when you need a complete inventory of objects in one namespace. Prefer get_namespace_map to see dependency edges between those resources, get_network_topology or get_storage_topology for focused traffic or storage graphs, or get_pod_details for deep diagnostics on a single pod.

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": {
      "cluster_id": "<cluster_id>",
      "namespace": "<namespace>"
    },
    "name": "get_namespace_resources"
  }
}

Input Schema

NameRequiredDescriptionDefault
namespaceYesTarget Kubernetes namespace name (1-63 chars, e.g. 'default', 'prod'). Use `get_namespaces` to discover available namespaces on the cluster.
cluster_idYesUnique KubeOrbit cluster identifier returned by `list_teams_and_clusters` (1-63 URL-safe chars, e.g. 'gke-prod-us', 'eks-staging').

Output Schema

NameRequiredDescriptionDefault
podsNoPods in the namespace with phase, readiness, restarts, node, and age.
pvcsNoPersistentVolumeClaims with status, capacity, storage class, and bound volume.
secretsNoSecret metadata only (name, type, key names, age). Plaintext secret values are never returned.
gatewaysNoGateway API Gateways (`available` flag plus `items`).
servicesNoServices with type, cluster IP, ports, external IPs, and selectors.
namespaceNoNamespace inspected.
cluster_idNoCluster identifier queried.
configmapsNoConfigMaps with name, key names, and metadata.
httproutesNoGateway API HTTPRoutes (`available` flag plus `items`).
serviceaccountsNoServiceAccounts configured in the namespace.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.1.1
    • addedInput schema / properties / cluster_id / description
      Added value: +"Unique KubeOrbit cluster identifier returned by `list_teams_and_clusters` (1-63 URL-safe chars, e.g. 'gke-prod-us', 'eks-staging')."
    • addedInput schema / properties / cluster_id / maxLength
      Added value: +63
    • addedInput schema / properties / cluster_id / minLength
      Added value: +1
    • addedInput schema / properties / cluster_id / pattern
      Added value: +"^[a-zA-Z0-9][a-zA-Z0-9._-]{0,62}$"
    • addedInput schema / properties / namespace / description
      Added value: +"Target Kubernetes namespace name (1-63 chars, e.g. 'default', 'prod'). Use `get_namespaces` to discover available namespaces on the cluster."
    • addedInput schema / properties / namespace / maxLength
      Added value: +63
    • addedInput schema / properties / namespace / minLength
      Added value: +1
    • addedInput schema / properties / namespace / pattern
      Added value: +"^[a-zA-Z0-9][a-zA-Z0-9._-]{0,62}$"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "cluster_id": {
      +      "default": "",
      +      "description": "Cluster identifier queried.",
      +      "title": "Cluster Id",
      +      "type": "string"
      +    },
      +    "configmaps": {
      +      "description": "ConfigMaps with name, key names, and metadata.",
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "title": "Configmaps",
      +      "type": "array"
      +    },
      +    "gateways": {
      +      "additionalProperties": true,
      +      "description": "Gateway API Gateways (`available` flag plus `items`).",
      +      "title": "Gateways",
      +      "type": "object"
      +    },
      +    "httproutes": {
      +      "additionalProperties": true,
      +      "description": "Gateway API HTTPRoutes (`available` flag plus `items`).",
      +      "title": "Httproutes",
      +      "type": "object"
      +    },
      +    "namespace": {
      +      "default": "",
      +      "description": "Namespace inspected.",
      +      "title": "Namespace",
      +      "type": "string"
      +    },
      +    "pods": {
      +      "description": "Pods in the namespace with phase, readiness, restarts, node, and age.",
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "title": "Pods",
      +      "type": "array"
      +    },
      +    "pvcs": {
      +      "description": "PersistentVolumeClaims with status, capacity, storage class, and bound volume.",
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "title": "Pvcs",
      +      "type": "array"
      +    },
      +    "secrets": {
      +      "description": "Secret metadata only (name, type, key names, age). Plaintext secret values are never returned.",
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "title": "Secrets",
      +      "type": "array"
      +    },
      +    "serviceaccounts": {
      +      "description": "ServiceAccounts configured in the namespace.",
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "title": "Serviceaccounts",
      +      "type": "array"
      +    },
      +    "services": {
      +      "description": "Services with type, cluster IP, ports, external IPs, and selectors.",
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "title": "Services",
      +      "type": "array"
      +    }
      +  },
      +  "title": "NamespaceResourcesOutput",
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (readOnly, idempotent, non-destructive), it discloses two facts an agent cannot get from structured fields: secrets are returned as metadata only with values never decoded, and large namespaces can produce sizable payloads. Both are operationally consequential — one is a security/scope guarantee, the other a cost/size warning.

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?

The purpose statement is front-loaded and every routing sentence earns its place. The intermediate enumeration of returned lists is somewhat redundant given that an output schema exists, which costs a point on economy but not on clarity.

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 two-parameter read tool with a full output schema and complete annotations, everything an agent needs is covered: scope, sibling routing, payload-size caveat, and the secrets-handling guarantee. No material gap remains.

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%, and both parameters already carry format rules, examples, and discovery pointers (get_namespaces, list_teams_and_clusters). The description adds no syntax or constraint detail beyond what the schema provides, so the baseline of 3 applies.

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 first sentence names a specific verb (fetch), a specific resource (all core resources in one namespace), and a specific shape (flat tabular inventory, single call). It explicitly contrasts itself with four named siblings (get_namespace_map, get_network_topology, get_storage_topology, get_pod_details), so an agent can disambiguate without opening any schema.

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?

It states the selecting condition directly: use when you need a complete inventory of objects in one namespace. It then routes away to the right alternative for each adjacent need — dependency edges, traffic graphs, storage graphs, single-pod diagnostics — with the reason attached to each.

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