Skip to main content
Glama

Get Namespace Network Topology

get_network_topology
Read-onlyIdempotent

Build an inbound network traffic graph for a Kubernetes namespace to trace ILB/Ingress, Gateway, HTTPRoute, Service, and Pod paths, helping debug ingress routing and Service-to-Pod selector wiring.

Instructions

Build the inbound network traffic graph (ILB/Ingress -> Gateway -> HTTPRoute -> Service -> Pod) for one namespace.

Returns cluster_id, namespace, gateway_api_available, nodes (with id, label, kind, status, meta), and directed edges (source -> target) tracing traffic paths into pods.

Use when debugging ingress routing, Gateway API HTTPRoutes, or Service-to-Pod selector wiring. Prefer get_storage_topology for PV/PVC volume wiring, get_namespace_map for all resource dependencies together, or get_namespace_resources for flat tabular lists.

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

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 routing edges (`source` -> `target`).
nodesNoGraph vertices (`id`, `label`, `kind` in ilb/ingress/gateway/httproute/service/pod, `status`, `meta`).
namespaceNoNamespace inspected.
cluster_idNoCluster identifier queried.
gateway_api_availableNoTrue when Gateway API CRDs (Gateway and HTTPRoute) are installed on the cluster.

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 routing edges (`source` -> `target`).",
      +      "items": {
      +        "additionalProperties": {
      +          "type": "string"
      +        },
      +        "type": "object"
      +      },
      +      "title": "Edges",
      +      "type": "array"
      +    },
      +    "gateway_api_available": {
      +      "default": false,
      +      "description": "True when Gateway API CRDs (Gateway and HTTPRoute) are installed on the cluster.",
      +      "title": "Gateway Api Available",
      +      "type": "boolean"
      +    },
      +    "namespace": {
      +      "default": "",
      +      "description": "Namespace inspected.",
      +      "title": "Namespace",
      +      "type": "string"
      +    },
      +    "nodes": {
      +      "description": "Graph vertices (`id`, `label`, `kind` in ilb/ingress/gateway/httproute/service/pod, `status`, `meta`).",
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "title": "Nodes",
      +      "type": "array"
      +    }
      +  },
      +  "title": "NetworkTopologyOutput",
      +  "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 this read-only, idempotent, and non-destructive, so the safety profile is covered. The description adds the meaningful behavioral boundary that it is inbound-only and scoped to a single namespace, and describes the shape of nodes/edges. It does not cover pagination, size limits, or behavior when Gateway API is unavailable beyond the `gateway_api_available` flag being returned.

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 tight sentences, front-loaded with the operation and the graph shape, then usage, then alternatives. The middle sentence enumerating return fields is largely duplicated by the output schema, which is the only wasted content.

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-required-parameter read tool with full schema coverage, annotations, and an output schema, the description supplies everything an agent needs: scope, graph semantics, the `gateway_api_available` caveat, and routing to alternatives. Return-value detail is correctly left to the output schema.

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 document format, pattern, and provenance (`list_teams_and_clusters`, `get_namespaces`). The description adds no parameter-level meaning beyond the schema, so the 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?

The description opens with a specific verb and resource: "Build the inbound network traffic graph" for one namespace, and spells out the exact path shape (`ILB/Ingress -> Gateway -> HTTPRoute -> Service -> Pod`). It also states the boundary (inbound traffic only, one namespace), which distinguishes it cleanly from topology/map siblings.

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?

Explicit use-when guidance is given ("debugging ingress routing, Gateway API HTTPRoutes, or Service-to-Pod selector wiring"), followed by three named alternatives with the conditions that select them (storage wiring, all dependencies, flat lists). Nothing is left to inference.

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