Skip to main content
Glama

list_containers

Retrieve and filter containers secured by RAD Security using image name, digest, namespace, cluster ID, or free text search to monitor Kubernetes security.

Instructions

List containers secured by RAD Security with optional filtering by image name, image digest, namespace, cluster_id, or free text search

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filtersNoFilter string (e.g., 'image_name:nginx' or 'image_digest:sha256:...' or 'owner_namespace:namespace' or 'cluster_id:cluster_id'). Multiple filters can be combined with commas.
offsetNoPagination offset. Default: 0
limitNoMaximum number of results to return. Default: 20
qNoFree text search query

Implementation Reference

  • The handler function that executes the logic for listing containers by making an API request to the RAD Security client and processing the response.
    export async function listContainers( client: RadSecurityClient, offset: number = 0, limit: number = 20, filters?: string, q?: string ): Promise<any> { const params: Record<string, any> = { limit, offset, filters, q }; const response = await client.makeRequest(`/accounts/${client.getAccountId()}/inventory_containers`, params); // Remove "id" from each container to avoid confusion response.entries.forEach((container: any) => { delete container.id; }); return response; }
  • Zod schema defining the input parameters for the list_containers tool.
    export const ListContainersSchema = z.object({ filters: z.string().optional().describe("Filter string (e.g., 'image_name:nginx' or 'image_digest:sha256:...' or 'owner_namespace:namespace' or 'cluster_id:cluster_id'). Multiple filters can be combined with commas."), offset: z.number().optional().describe("Pagination offset. Default: 0"), limit: z.number().optional().describe("Maximum number of results to return. Default: 20"), q: z.string().optional().describe("Free text search query"), });
  • src/index.ts:130-135 (registration)
    Registration of the list_containers tool in the listTools handler, including name, description, and schema.
    { name: "list_containers", description: "List containers secured by RAD Security with optional filtering by image name, image digest, namespace, cluster_id, or free text search", inputSchema: zodToJsonSchema(containers.ListContainersSchema), },
  • src/index.ts:722-737 (registration)
    Dispatch handler in the callToolRequest that parses arguments, calls the listContainers function, and returns the response for the list_containers tool.
    case "list_containers": { const args = containers.ListContainersSchema.parse( request.params.arguments ); const response = await containers.listContainers( client, args.offset, args.limit, args.filters, args.q ); 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