Skip to main content
Glama
rad-security

RAD Security

Official
by rad-security

list_network_connections

View and filter network connections in Kubernetes environments to monitor traffic patterns and identify potential security risks.

Instructions

List network connections with optional filtering

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filtersNoFilter string for filtering results.Filter options: source_workload_name, source_workload_namespace, destination_workload_name, destination_workload_namespace, cluster_id. Example: 'source_workload_name:my-workload,destination_workload_name:my-workload,cluster_id:my-cluster'
limitNoLimit the number of items in the list
qNoQuery to filter the list of network connections

Implementation Reference

  • The main handler function for the 'list_network_connections' tool. It validates input parameters using the schema, makes an API request to fetch network connections, and returns the response.
    export async function listNetworkConnections(
      client: RadSecurityClient,
      params: z.infer<typeof listNetworkConnectionsSchema>
    ): Promise<any> {
      const validatedParams = listNetworkConnectionsSchema.parse(params);
      const response = await client.makeRequest(
        `/accounts/${client.getAccountId()}/container_runtime_insights/network_connections`,
        validatedParams
      );
      return response;
    }
  • Zod schema defining the input parameters for the listNetworkConnections tool, including optional filters, limit, and query.
    export const listNetworkConnectionsSchema = z.object({
      filters: z.string().optional().describe("Filter string for filtering results." +
        "Filter options: source_workload_name, source_workload_namespace, destination_workload_name, destination_workload_namespace, cluster_id. " +
        "Example: 'source_workload_name:my-workload,destination_workload_name:my-workload,cluster_id:my-cluster'"),
      limit: z.number().optional().default(20).describe("Limit the number of items in the list"),
      q: z.string().optional().describe("Query to filter the list of network connections"),
    });
  • src/index.ts:396-400 (registration)
    Tool registration in the ListTools handler, defining the tool name, description, and input schema for discovery.
    name: "list_network_connections",
    description: "List network connections with optional filtering",
    inputSchema: zodToJsonSchema(
      runtimeNetwork.listNetworkConnectionsSchema
    ),
  • src/index.ts:1193-1205 (registration)
    Tool execution handler in the CallToolRequest switch case. Validates arguments, calls the handler function, and formats the response.
    case "list_network_connections": {
      const args = runtimeNetwork.listNetworkConnectionsSchema.parse(
        request.params.arguments
      );
      const response = await runtimeNetwork.listNetworkConnections(
        client,
        args
      );
      return {
        content: [
          { type: "text", text: JSON.stringify(response, null, 2) },
        ],
      };
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions optional filtering but doesn't disclose behavioral traits like pagination, rate limits, authentication needs, or what 'list' entails (e.g., real-time vs. cached data, ordering). For a tool with no annotation coverage, this leaves significant gaps in understanding its operation.

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 a single, efficient sentence with no wasted words. It's front-loaded with the core action ('list network connections') and includes a key feature ('optional filtering'). However, it could be slightly more structured by explicitly noting it's a read operation or basic usage context.

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

Completeness2/5

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

Given no annotations and no output schema, the description is incomplete for a tool with 3 parameters and potential complexity. It lacks details on return values, error handling, or behavioral constraints. For a listing tool in a security/network context, more context on data freshness, scope, or limitations would be beneficial.

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 description coverage is 100%, so parameters are well-documented in the schema. The description adds minimal value by mentioning 'optional filtering,' which aligns with the 'filters' and 'q' parameters but doesn't provide additional semantics beyond what the schema already explains. Baseline 3 is appropriate as the schema does the heavy lifting.

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

Purpose3/5

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

The description states the verb ('list') and resource ('network connections'), which provides a basic purpose. However, it's vague about scope and doesn't distinguish from sibling tools like 'list_network_connection_srcs' or 'list_http_requests' that might handle related network data. The optional filtering mention adds some specificity but remains general.

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?

No guidance is provided on when to use this tool versus alternatives. With many sibling tools for listing various resources (e.g., 'list_http_requests', 'list_network_connection_srcs'), the description lacks context on differentiation, prerequisites, or exclusions. It merely states the action without situational advice.

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/rad-security/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server