list_network_connection_srcs
Identify network connection sources in Kubernetes environments with filtering by workload and cluster parameters for security analysis.
Instructions
List network connection sources with optional filtering by source and destination workloads
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' | |
| offset | No | Offset to start the list from | |
| limit | No | Limit the number of items in the list | |
| q | No | Query to filter the list of network connection sources |
Implementation Reference
- src/operations/runtime_network.ts:55-65 (handler)The main handler function that validates input using the schema and makes an API request to the RAD Security backend to retrieve network connection sources.export async function listNetworkConnectionSources( client: RadSecurityClient, params: z.infer<typeof listNetworkConnectionSourcesSchema> ): Promise<any> { const validatedParams = listNetworkConnectionSourcesSchema.parse(params); const response = await client.makeRequest( `/accounts/${client.getAccountId()}/container_runtime_insights/network_connection_sources`, validatedParams ); return response; }
- Zod schema defining the input parameters for the list_network_connection_srcs tool, including filters, offset, limit, and query.export const listNetworkConnectionSourcesSchema = 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'"), offset: z.number().optional().describe("Offset to start the list from"), 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 connection sources"), });
- src/index.ts:403-409 (registration)Tool registration in the ListTools response, specifying name, description, and input schema.name: "list_network_connection_srcs", description: "List network connection sources with optional filtering by source and destination workloads", inputSchema: zodToJsonSchema( runtimeNetwork.listNetworkConnectionSourcesSchema ), },
- src/index.ts:1207-1221 (registration)MCP CallToolRequest handler that parses arguments, calls the listNetworkConnectionSources function, and formats the response.case "list_network_connection_srcs": { const args = runtimeNetwork.listNetworkConnectionSourcesSchema.parse( request.params.arguments ); const response = await runtimeNetwork.listNetworkConnectionSources( client, args ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2) }, ], }; }