Skip to main content
Glama
rad-security

RAD Security

Official
by rad-security

list_k8s_resource_misconfigs

Identify and analyze Kubernetes resource manifest misconfigurations to enhance security posture and compliance.

Instructions

Get manifest misconfigurations for a Kubernetes resource

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resource_uidYesKubernetes resource UID to get misconfigurations for

Implementation Reference

  • Main handler function that fetches and deduplicates Kubernetes resource misconfigurations for a given resource UID using the RAD Security API.
    export async function listKubernetesResourceMisconfigurations(
      client: RadSecurityClient,
      resourceUid: string
    ): Promise<any> {
      const misconfigs = await client.makeRequest(
        `/accounts/${client.getAccountId()}/misconfig`,
        { kubeobject_uids: resourceUid, page_size: 50 }
      );
    
      // deduplicate the list based on field "guard_policy.human_id"
      const seenIds = new Set<string>();
      const toReturn = [];
    
      for (const misconfig of misconfigs.entries) {
        const humanId = misconfig.guard_policy.human_id;
        if (!seenIds.has(humanId)) {
          seenIds.add(humanId);
          toReturn.push({
            id: misconfig.id,
            cluster_id: misconfig.cluster_id,
            title: misconfig.guard_policy.title,
            human_id: misconfig.guard_policy.human_id,
          });
        }
      }
    
      misconfigs.entries = toReturn;
      return misconfigs;
    }
  • Zod input schema defining the required 'resource_uid' parameter.
    export const ListKubernetesResourceMisconfigurationsSchema = z.object({
      resource_uid: z.string().describe("Kubernetes resource UID to get misconfigurations for"),
    });
  • src/index.ts:333-339 (registration)
    Tool registration in the list of available tools, including name, description, and input schema.
      name: "list_k8s_resource_misconfigs",
      description:
        "Get manifest misconfigurations for a Kubernetes resource",
      inputSchema: zodToJsonSchema(
        misconfigs.ListKubernetesResourceMisconfigurationsSchema
      ),
    },
  • src/index.ts:1092-1106 (registration)
    Dispatch handler in the switch statement for call_tool requests, parsing args and invoking the misconfigs handler.
    case "list_k8s_resource_misconfigs": {
      const args =
        misconfigs.ListKubernetesResourceMisconfigurationsSchema.parse(
          request.params.arguments
        );
      const response =
        await misconfigs.listKubernetesResourceMisconfigurations(
          client,
          args.resource_uid
        );
      return {
        content: [
          { type: "text", text: JSON.stringify(response, null, 2) },
        ],
      };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Get') but does not specify whether this is a read-only operation, if it requires authentication, what the output format is, or any rate limits. For a tool that likely involves security or compliance checks, this lack of detail is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and efficient, making it easy for an agent to parse quickly, with no wasted information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (likely involving security misconfigurations) and the absence of annotations and output schema, the description is minimally adequate. It covers the basic purpose but lacks details on behavior, output, or usage context, which are important for an agent to operate effectively in a Kubernetes security environment.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the single parameter 'resource_uid' clearly documented. The description does not add any additional meaning beyond what the schema provides, such as examples or constraints on the UID format. Given the high schema coverage, a baseline score of 3 is appropriate as the schema handles the parameter documentation adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('manifest misconfigurations for a Kubernetes resource'), making it easy to understand what it does. However, it does not explicitly differentiate from its sibling 'get_k8s_resource_misconfig', which appears similar, leaving some ambiguity in distinguishing between them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, such as the sibling 'get_k8s_resource_misconfig' or other related tools like 'list_k8s_resource_misconfig_policies'. It lacks context on prerequisites, exclusions, or specific scenarios, leaving the agent to infer usage based on the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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