Skip to main content
Glama

get_neighborhood

Read-only

Investigates cross-resource failures by returning the BFS-expanded topology neighborhood around a known Kubernetes resource, tracing dependencies, owners, and references.

Instructions

Use when investigating cross-resource failures around a known resource: service routing, targetPort/selector/endpoints problems, dependency timeouts, config/secret refs, owner chains, or traffic not reaching pods. Returns the BFS-expanded topology neighborhood around one root, which is usually cheaper and clearer than get_topology once you have a suspect. Typical flow: issues/search/list_resources identify a Service or workload, then get_neighborhood traces its upstream/downstream Services, workloads, Pods, refs, and owners. Profile auto (default) picks a bounded edge set from the root kind; profile all expands every edge type and is heavier, use it only when auto produced a too-narrow neighborhood. Hops defaults to 1 and maxes at 2. Nodes are RBAC-filtered; denied neighbors appear only as aggregate omitted counts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYesresource kind: pod, deployment, service, application, etc.
groupNoAPI group required to disambiguate kinds that collide across groups. Examples: serving.knative.dev for KNative Service (vs core/v1 Service), cluster.x-k8s.io for CAPI Cluster (vs CNPG Cluster), networking.istio.io for Istio Gateway (vs gateway.networking.k8s.io Gateway). Omit for kinds with no known collisions.
namespaceNoresource namespace; omit for cluster-scoped kinds
nameYesresource name
profileNoneighborhood breadth: auto or all. Default: auto (picks a bounded edge set from the root kind). all expands every edge type and is heavier; use only when auto produced a too-narrow neighborhood.
hopsNoBFS depth. Default 1, max 2.
max_nodesNonode-budget cap. Default 25. When the cap is hit mid-expansion, truncated=true is set and the partial subgraph is returned.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/skyhook-io/radar'

If you have feedback or need assistance with the MCP directory API, please join our Discord server