Skip to main content
Glama

list_containers

Retrieve and filter containers secured by RAD Security using criteria like image name, digest, namespace, or cluster ID. Supports pagination and free text search for precise results.

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.
limitNoMaximum number of results to return. Default: 20
offsetNoPagination offset. Default: 0
qNoFree text search query

Implementation Reference

  • Executes the core logic to list containers: constructs API parameters, fetches from RAD Security backend `/inventory_containers` endpoint, removes 'id' fields from entries to avoid confusion, and returns 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 for validating tool inputs: optional filters (e.g., image_name, digest, namespace), offset, limit for pagination, and free-text query 'q'.
    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:116-119 (registration)
    Registers the tool in the MCP server's listTools response, including name, description, and converted JSON schema for inputs.
    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:407-413 (registration)
    In the MCP CallToolRequest handler, parses arguments using the schema, calls the listContainers function with client and args, and returns JSON-stringified response as text content.
    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