get_k8s_resource_misconfig
Retrieve detailed information about specific Kubernetes resource misconfigurations to identify and address security vulnerabilities in your cluster.
Instructions
Get detailed information about a specific Kubernetes resource misconfiguration
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cluster_id | Yes | ID of the cluster to get misconfiguration for | |
| misconfig_id | Yes | ID of the misconfiguration to get details for |
Implementation Reference
- src/operations/misconfigs.ts:47-61 (handler)The handler function that executes the core logic of fetching Kubernetes resource misconfiguration details via API request.export async function getKubernetesResourceMisconfigurationDetails( client: RadSecurityClient, clusterId: string, misconfigId: string ): Promise<any> { const response = await client.makeRequest( `/accounts/${client.getAccountId()}/clusters/${clusterId}/misconfig/${misconfigId}` ); if (!response) { throw new Error(`No misconfiguration found with ID: ${misconfigId}`); } return response; }
- src/operations/misconfigs.ts:8-11 (schema)Zod schema defining the input parameters for the tool: cluster_id and misconfig_id.export const GetKubernetesResourceMisconfigurationDetailsSchema = z.object({ cluster_id: z.string().describe("ID of the cluster to get misconfiguration for"), misconfig_id: z.string().describe("ID of the misconfiguration to get details for"), });
- src/index.ts:341-347 (registration)Registration of the tool in the MCP server's listTools response, including name, description, and input schema reference.name: "get_k8s_resource_misconfig", description: "Get detailed information about a specific Kubernetes resource misconfiguration", inputSchema: zodToJsonSchema( misconfigs.GetKubernetesResourceMisconfigurationDetailsSchema ), },
- src/index.ts:1108-1124 (registration)Handler registration in the MCP server's CallToolRequest switch statement, parsing args and calling the implementation function.case "get_k8s_resource_misconfig": { const args = misconfigs.GetKubernetesResourceMisconfigurationDetailsSchema.parse( request.params.arguments ); const response = await misconfigs.getKubernetesResourceMisconfigurationDetails( client, args.cluster_id, args.misconfig_id ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2) }, ], }; }