Skip to main content
Glama
ranson21

kube-diagnostics-mcp

by ranson21

get_open_connections

Examine open connections inside a pod's network namespace, showing destination services/pods, socket states, and listening ports to detect TIME_WAIT/CLOSE_WAIT storms.

Instructions

[probe] Established connections by destination (resolved to Services/pods), socket state counts (TIME_WAIT/CLOSE_WAIT storms), listening ports - from /proc/net inside the pod's network namespace. Passive.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
podNoExact pod name (alternative to service)
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.7/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. The description discloses that the tool is passive and reads from /proc/net inside the pod's network namespace, which implies it does not modify state. However, it does not clarify what happens if the namespace is inaccessible, authentication requirements, or how destination resolution to Services/pods is performed. The description adds 'Passive' as a behavioral trait, which is useful, but lacks depth on edge cases and side effects.

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 compact and efficiently packed into a single sentence with a few parenthetical clarifications. It front-loads the core purpose ('Established connections by destination') and follows with key details (socket states, listening ports, data source). Every clause adds informative value—the data source, the network namespace, and the behavioral note 'Passive'—without unnecessary fluff. The word count is appropriate for the complexity.

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?

The tool has 3 parameters with 100% schema coverage, no output schema, and no annotations. The description covers the core functionality but omits practical details an agent might need: how to specify the target (pod vs. service) is in the schema, but the description does not explain the resolution mechanism from destination to Services/pods. There is no mention of the output shape or how to interpret the socket state counts (e.g., thresholds for storms). The complexity is moderate, and while the description is sufficient to understand what it does, it is not complete enough to anticipate edge cases or output semantics without further investigation.

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 has 100% description coverage for all three parameters (pod, service, namespace), so the baseline is 3. The description does not add additional meaning beyond the schema's definitions, but it does mention that the tool operates within a pod's network namespace, which indirectly suggests that 'pod' or 'service' identifies the target pod. However, it does not clarify the relationship between 'pod' and 'service' (e.g., if both are provided, which takes precedence) or any parameter syntax details, so there is no added value over the schema.

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 a specific verb and resource: 'Established connections by destination' and 'listening ports' from /proc/net in the pod's network namespace. It also identifies the tool as a probe, distinguishing it from sibling tools like get_endpoints or get_connection_pool_status that may have different focuses. The scope is precise, covering socket state counts and destination resolution, making it unambiguous.

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 usage in network diagnostics (e.g., TIME_WAIT/CLOSE_WAIT storms) but does not explicitly state when to use this tool over siblings like get_endpoints or get_listening_ports. There is no clear when-not-to-use guidance or mention of alternatives. The '[probe]' and 'Passive' hints give some context but are not explicit usage instructions.

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