list_network_connections
Retrieve and filter network connections in Kubernetes and cloud environments by workload, namespace, or cluster ID using RAD Security's MCP server.
Instructions
List network connections with optional filtering
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filters | No | 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 | No | Limit the number of items in the list | |
| q | No | Query to filter the list of network connections |
Implementation Reference
- src/operations/runtime_network.ts:43-53 (handler)The main handler function that validates the input parameters using the schema and makes an API request to the RAD Security backend to list network connections.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 shape for the list_network_connections tool, including optional filters, limit, and query parameters.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:262-266 (registration)Registration of the tool in the MCP server's listTools response handler, specifying name, description, and input schema.{ name: "list_network_connections", description: "List network connections with optional filtering", inputSchema: zodToJsonSchema(runtimeNetwork.listNetworkConnectionsSchema), },
- src/index.ts:651-656 (handler)Dispatch handler in the MCP server's CallToolRequest handler that parses arguments, calls the runtime_network handler, 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) }], };