Skip to main content
Glama

List networkpolicies

k8s_list_networkpolicies
Read-onlyIdempotent

Lists Kubernetes NetworkPolicies in a namespace, optionally using a specified context, so you can inspect network policy configuration.

Instructions

List NetworkPolicies in a namespace.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "k8s_list_networkpolicies"
  }
}

Input Schema

NameRequiredDescriptionDefault
contextNoNamed context of the multi-context pool to run against (see cm_multi_context list_contexts); the default context if omitted.
namespaceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.4.2

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, so the safety profile is fully covered. The description adds only the namespace scoping note; it does not say what happens if namespace is omitted (all namespaces vs default namespace) or whether results are paginated.

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?

A single front-loaded sentence with no filler or repetition. It is efficiently written, though its brevity comes at the cost of the behavioral detail scored elsewhere.

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 simple two-parameter read-only list tool with annotations covering safety, the description is minimally sufficient. It still leaves the namespace-omitted case and the shape of returned results unaddressed, and there is no output schema to fall back on.

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 50%: the context parameter is documented in the schema, while namespace has only a null default and no description. The phrase 'in a namespace' hints that namespace narrows scope but leaves the omitted-namespace behavior undefined, which is the key ambiguity for this parameter.

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?

States a specific verb and resource ('List NetworkPolicies') plus a scope ('in a namespace'), so the agent knows exactly what objects come back. It does not distinguish itself from near-neighbors such as k8s_list_networks or k8s_list_ingress, which would require an explicit differentiation sentence.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no alternative named, and no indication of when this is preferable to the other list tools in the catalog. The only usage signal is the implicit namespace scoping.

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

Deploy Server

Other Tools