Skip to main content
Glama

get_neighborhood

Read-only

Trace the topology neighborhood around a Kubernetes resource to investigate cross-resource failures. Shows upstream/downstream services, workloads, pods, and owners with RBAC filtering.

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.
Behavior5/5

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

Annotations already declare readOnlyHint=true. The description adds significant behavioral context: RBAC filtering (denied neighbors shown as aggregate omitted counts), default and max hops, node-budget cap with truncated flag. No contradictions.

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 description is front-loaded with usage scenario and purpose, then logically flows to typical use case and parameter details. While somewhat long, every sentence adds value. Could be slightly tighter.

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?

Given no output schema, the description covers key aspects: when to use, what it returns (with RBAC filtering note), parameter defaults and limits, and edge cases (max_nodes truncation). Missing explicit output format, but sufficient for a read-only topology tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description adds some value by integrating parameter behavior into usage flow (e.g., profile selection advice, hops limits), but mostly restates schema info.

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 clearly states the tool returns a BFS-expanded topology neighborhood around a root resource. It distinguishes itself from sibling 'get_topology' by noting it is cheaper and clearer once a suspect is identified.

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?

The description explicitly specifies when to use the tool: investigating cross-resource failures. It provides a typical workflow and contrasts with get_topology, and advises when to use 'all' profile vs default.

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

Install Server

Other Tools

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