Skip to main content
Glama
rad-security

RAD Security

Official
by rad-security

get_k8s_resource_details

Retrieve Kubernetes resource manifests from RAD Security to analyze configurations and identify security risks in cloud environments.

Instructions

Get the latest manifest of a Kubernetes resource

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cluster_idYesID of the Kubernetes cluster
resource_uidYesResource UID to get the details for

Implementation Reference

  • The handler function that executes the tool: fetches Kubernetes resource details from the API endpoint `/clusters/{clusterId}/resources/{resourceUid}/latest`, handles errors, and decodes the base64-encoded raw manifest.
    export async function getKubernetesResourceDetails(
      client: RadSecurityClient,
      clusterId: string,
      resourceUid: string
    ): Promise<any> {
      const details = await client.makeRequest(
        `/clusters/${clusterId}/resources/${resourceUid}/latest`
      );
    
      if (!details) {
        throw new Error(`No details found for resource_uid: ${resourceUid} in cluster: ${clusterId}`);
      }
    
      // Decode the base64 raw manifest
      if (details.raw) {
        details.raw = Buffer.from(details.raw, 'base64').toString('utf-8');
      }
    
      return details;
    }
  • Zod schema for input validation: requires cluster_id and resource_uid.
    export const GetKubernetesResourceDetailsSchema = z.object({
      cluster_id: z.string().describe("ID of the Kubernetes cluster"),
      resource_uid: z.string().describe("Resource UID to get the details for"),
    });
  • src/index.ts:313-318 (registration)
    Tool registration in the listTools response: defines the tool name, description, and references the input schema.
      name: "get_k8s_resource_details",
      description: "Get the latest manifest of a Kubernetes resource",
      inputSchema: zodToJsonSchema(
        kubeobject.GetKubernetesResourceDetailsSchema
      ),
    },
  • src/index.ts:1058-1071 (registration)
    Tool handler dispatch in the CallToolRequest switch statement: parses arguments using the schema and invokes the getKubernetesResourceDetails handler function.
    case "get_k8s_resource_details": {
      const args = kubeobject.GetKubernetesResourceDetailsSchema.parse(
        request.params.arguments
      );
      const response = await kubeobject.getKubernetesResourceDetails(
        client,
        args.cluster_id,
        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 this is a 'Get' operation but doesn't clarify if it's read-only, what permissions are required, whether it returns structured data or raw manifests, or if there are rate limits. This leaves significant behavioral gaps for a tool that interacts with Kubernetes clusters.

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, efficient sentence that communicates the core purpose without unnecessary words. It's appropriately sized for a simple retrieval operation and front-loads the essential 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?

For a tool with no annotations and no output schema, the description is minimally complete but lacks important context. It identifies what the tool does but doesn't explain what 'latest manifest' means, what format it returns, or how it differs from other Kubernetes resource tools. The 100% schema coverage helps, but behavioral gaps remain.

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, clearly documenting both required parameters. The description adds no additional parameter semantics beyond what the schema already provides, so it meets the baseline score of 3 for adequate but not enhanced parameter documentation.

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 action ('Get') and resource ('latest manifest of a Kubernetes resource'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'get_k8s_resource_misconfig' or 'list_k8s_resources' that also retrieve Kubernetes resource information, preventing a perfect score.

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. With many sibling tools like 'get_k8s_resource_misconfig' and 'list_k8s_resources' that might retrieve similar or overlapping data, there's no indication of when this specific 'get details' operation is appropriate versus other retrieval methods.

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