get_container_llm_analysis
Analyze a container's process tree using LLM to identify security risks and anomalies for enhanced Kubernetes and cloud environment protection.
Instructions
Get LLM analysis of a container's process tree
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| container_id | Yes | Container ID to get LLM analysis for |
Implementation Reference
- src/operations/runtime.ts:168-178 (handler)The core handler function that fetches container runtime insights from the RAD Security API for the given container ID and returns the LLM analysis from the first entry.export async function getContainerLLMAnalysis( client: RadSecurityClient, containerId: string ): Promise<any> { const cris = await client.makeRequest( `/accounts/${client.getAccountId()}/container_runtime_insights`, { container_id: containerId } ); return cris.entries[0].analysis; }
- src/operations/runtime.ts:13-15 (schema)Zod schema defining the input parameters for the tool: container_id (string). Used for validation in both registration and dispatch.export const GetContainerLLMAnalysisSchema = z.object({ container_id: z.string().describe("Container ID to get LLM analysis for"), });
- src/index.ts:249-253 (registration)Tool registration in the listTools handler, providing the tool name, description, and input schema.{ name: "get_container_llm_analysis", description: "Get LLM analysis of a container's process tree", inputSchema: zodToJsonSchema(runtime.GetContainerLLMAnalysisSchema), },
- src/index.ts:633-642 (registration)Dispatch logic in the MCP server's CallToolRequest handler that parses input using the schema and calls the runtime handler function.case "get_container_llm_analysis": { const args = runtime.GetContainerLLMAnalysisSchema.parse(request.params.arguments); const response = await runtime.getContainerLLMAnalysis( client, args.container_id ); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }], }; }