Skip to main content
Glama
ranson21

kube-diagnostics-mcp

by ranson21

get_network_policies

Inspect Kubernetes NetworkPolicies for a workload in a namespace to determine if ingress/egress is restricted or wide open.

Instructions

NetworkPolicies in a namespace, decoded; whether a given workload's ingress/egress is restricted; flags 'no policy = wide open'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serviceNoWorkload name as you would say it: a Deployment, StatefulSet, DaemonSet, Service, or Pod name
namespaceNoKubernetes namespace (required: no default configured; see list_namespaces)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds useful context: the tool decodes policies and flags 'no policy = wide open', indicating how it interprets absence of policies. However, it does not disclose whether the operation is read-only, any authentication requirements, or the return format, leaving some behavioral aspects unexplained.

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 a single, dense sentence that packs the core purpose, a key behavior (decoding), and an important semantic flag ('no policy = wide open'). It front-loads the essential information with zero fluff, making it highly efficient for an agent to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with two parameters (both documented), no output schema, and no annotations, the description covers the primary functionality and one behavioral nuance. However, it does not specify the exact output structure (e.g., list of policies plus a boolean for restriction) or any edge cases like namespace not found. While sufficient for basic invocation, an agent might need to infer the exact return format, leaving some gaps.

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%, so both parameters (service and namespace) are already documented in the schema. The description adds no additional parameter-level meaning beyond what the schema provides. The baseline of 3 applies because the schema handles the parameter documentation effectively.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves NetworkPolicies in a namespace, decodes them, and evaluates a given workload's ingress/egress restriction status. It also highlights a distinctive flag for 'no policy = wide open', which differentiates it from sibling tools like get_egress_destinations or get_exposure. The verb 'get' is implicit, but the resource and action are specific enough for an agent to infer purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is used when you need to check whether a workload's network traffic is restricted by policies, but it does not explicitly state when to use it versus alternatives like get_egress_destinations or security_posture. It also does not mention prerequisites or exclusions, relying on the reader to infer the use case from the purpose.

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