Skip to main content
Glama
rad-security

RAD Security

Official
by rad-security

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
NameRequiredDescriptionDefault
cluster_idYesID of the cluster to get misconfiguration for
misconfig_idYesID of the misconfiguration to get details for

Implementation Reference

  • 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;
    }
  • 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) },
        ],
      };
    }

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