Skip to main content
Glama

get_neighborhood

Read-only

Trace the topology neighborhood around a suspected Kubernetes resource to uncover upstream and downstream dependencies behind service routing, endpoint, timeout, config, and traffic failures.

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
hopsNoBFS depth. Default 1, max 2.
kindYesresource kind: pod, deployment, service, application, etc.
nameYesresource name
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.
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.
max_nodesNonode-budget cap. Default 25. When the cap is hit mid-expansion, truncated=true is set and the partial subgraph is returned.
namespaceNoresource namespace; omit for cluster-scoped kinds
Behavior5/5

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

The description reveals non-obvious behavioral details beyond the annotations: 'Nodes are RBAC-filtered; denied neighbors appear only as aggregate omitted counts.' It also discloses performance/characteristics like 'cheaper' and how profile all is 'heavier.' These traits are not present in annotations (readOnlyHint, openWorldHint) and add valuable context for the agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized for a complex tool. It front-loads the primary use case, then explains the return behavior, profile options, and RBAC filtering in a compact, information-dense paragraph. Every sentence earns its place with no fluff.

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?

Given the tool's complexity and the absence of an output schema, the description is thorough: it explains the BFS-expanded neighborhood, typical usage flow, profile behavior, hop limits, and RBAC filtering. It covers the necessary operational context without needing to restate parameter details already in the 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?

The input schema already provides 100% coverage of parameter descriptions, including defaults and behavior for hops, profile, max_nodes, etc. The tool description largely repeats this information (e.g., 'Hops defaults to 1 and maxes at 2') without adding materially new parameter-level semantics. Baseline of 3 is appropriate because the schema does the heavy lifting.

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's function: 'Returns the BFS-expanded topology neighborhood around one root.' It specifies the resource type (topology around a root) and distinguishes it from the sibling tool get_topology by noting it is 'usually cheaper and clearer ... once you have a suspect.'

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 provides explicit when-to-use guidance: 'Use when investigating cross-resource failures around a known resource...' and lists concrete scenarios (service routing, targetPort/selector problems, etc.). It also gives alternatives and exclusions, such as preferring get_topology in other situations and advising to use profile all only when auto yields a too-narrow result.

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