Skip to main content
Glama

Get Full Namespace Dependency Map

get_namespace_map
Read-onlyIdempotent

Build an end-to-end dependency graph for all workloads, routing, configs, Secret metadata, ServiceAccounts, and PVCs in a Kubernetes namespace to reveal how pods connect to their configs and volumes.

Instructions

Build the end-to-end dependency graph of all workloads, routing, configs, secret metadata, ServiceAccounts, and PVCs in one namespace.

Returns cluster_id, namespace, ingress_available, gateway_api_available, nodes (tagged with app_group, kind, status, meta; Secret nodes expose metadata only), and directed edges connecting Ingress/Gateway/Services -> Pods, Workloads -> Pods, and ConfigMaps/Secrets/PVCs/ServiceAccounts -> Pods.

Use to understand how every resource in a namespace is wired together and which configs or volumes a pod depends on. Prefer get_network_topology or get_storage_topology for narrower single-path graphs, get_namespace_resources for flat lists, or get_cluster_workload_map for cluster-wide node-to-pod placement.

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_map"
  }
}

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
edgesNoDirected dependency edges connecting traffic, workload controllers, pods, ConfigMaps, Secrets, ServiceAccounts, and PVCs.
nodesNoFull namespace resource graph nodes (`id`, `label`, `kind`, `group`, `app_group`, `status`, `meta`). Secret nodes expose metadata only.
namespaceNoNamespace inspected.
cluster_idNoCluster identifier queried.
ingress_availableNoTrue when Ingress listing is available.
gateway_api_availableNoTrue when Gateway API CRDs are installed.

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"
      +    },
      +    "edges": {
      +      "description": "Directed dependency edges connecting traffic, workload controllers, pods, ConfigMaps, Secrets, ServiceAccounts, and PVCs.",
      +      "items": {
      +        "additionalProperties": {
      +          "type": "string"
      +        },
      +        "type": "object"
      +      },
      +      "title": "Edges",
      +      "type": "array"
      +    },
      +    "gateway_api_available": {
      +      "default": false,
      +      "description": "True when Gateway API CRDs are installed.",
      +      "title": "Gateway Api Available",
      +      "type": "boolean"
      +    },
      +    "ingress_available": {
      +      "default": false,
      +      "description": "True when Ingress listing is available.",
      +      "title": "Ingress Available",
      +      "type": "boolean"
      +    },
      +    "namespace": {
      +      "default": "",
      +      "description": "Namespace inspected.",
      +      "title": "Namespace",
      +      "type": "string"
      +    },
      +    "nodes": {
      +      "description": "Full namespace resource graph nodes (`id`, `label`, `kind`, `group`, `app_group`, `status`, `meta`). Secret nodes expose metadata only.",
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "title": "Nodes",
      +      "type": "array"
      +    }
      +  },
      +  "title": "NamespaceMapOutput",
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world, so the safety profile is covered. The description adds real context beyond them: which node kinds appear, that Secret nodes expose metadata only (a meaningful data-exposure caveat), and the exact edge directions. It does not discuss size limits or performance on large namespaces, which is the remaining gap.

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?

Three clearly separated blocks — purpose, return shape, usage routing — with the core action front-loaded in the first sentence. The return-field enumeration is somewhat long given an output schema exists, but it earns its place by defining edge directions and the Secret metadata caveat.

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 full schema coverage, an output schema, and complete annotations, nothing an agent needs in order to select and call it is missing. Purpose, scope, comparative routing, and graph semantics are all covered.

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 coverage is 100% with rich per-parameter descriptions including discovery pointers (get_namespaces, list_teams_and_clusters), so the schema carries parameter meaning. The description only echoes cluster_id and namespace in the return value list and adds no format or constraint detail beyond the schema. Baseline 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?

Opens with a specific verb and resource: 'Build the end-to-end dependency graph' scoped to 'one namespace', enumerating the resource kinds covered. An agent can distinguish it from flat-listing or topology-specific siblings 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?

Explicitly states the use case ('understand how every resource in a namespace is wired together and which configs or volumes a pod depends on') and names four alternatives with the condition that selects each (get_network_topology, get_storage_topology, get_namespace_resources, get_cluster_workload_map). Routing guidance is complete.

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