Skip to main content
Glama

list_images

Retrieve container images from RAD Security with pagination, sorting, and filtering options to manage security insights in Kubernetes environments.

Instructions

List container images with optional filtering by page, page size, sort, and search query

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of items per page
offsetNoOffset to start the list from
sortNoSort ordername:asc
filtersNoFilter string (e.g., 'eol:ok', 'eol:reached', 'name:nginx', 'tag:1.26.0'), where eol is end of life status of the base image
qNoFree text search query

Implementation Reference

  • The main handler function that fetches the list of images from the RAD Security API, applies processing to upgrade_opportunities, and returns the result.
    export async function listImages( client: RadSecurityClient, limit: number = 20, offset: number = 0, sort: string = "name:asc", filters?: string, q?: string ): Promise<any> { const params: Record<string, any> = { limit, offset, sort }; if (q) { params.q = q; } if (filters) { params.filters = filters; } let images = await client.makeRequest(`/accounts/${client.getAccountId()}/inventory_images`, params); let toReturn = []; for (let image of images.entries) { // leave only first element in the array: upgrade_opportunities if (image.upgrade_opportunities && image.upgrade_opportunities.length > 0) { image.upgrade_opportunities = [image.upgrade_opportunities[0]]; } toReturn.push(image); } images.entries = toReturn; return images; }
  • Zod schema defining the input parameters for the list_images tool, used for validation.
    export const ListImagesSchema = z.object({ limit: z.number().optional().default(20).describe("Number of items per page"), offset: z.number().optional().default(0).describe("Offset to start the list from"), sort: z.string().optional().default("name:asc").describe("Sort order"), filters: z.string().optional().describe("Filter string (e.g., 'eol:ok', 'eol:reached', 'name:nginx', 'tag:1.26.0'), where eol is end of life status of the base image"), q: z.string().optional().describe("Free text search query"), });
  • src/index.ts:284-288 (registration)
    Registration of the list_images tool in the ListTools response, including name, description, and input schema.
    name: "list_images", description: "List container images with optional filtering by page, page size, sort, and search query", inputSchema: zodToJsonSchema(images.ListImagesSchema), },
  • src/index.ts:1003-1019 (registration)
    Dispatch handler in the CallToolRequest that parses arguments, calls the listImages function, and formats the response.
    case "list_images": { const args = images.ListImagesSchema.parse( request.params.arguments ); const response = await images.listImages( client, args.limit, args.offset, args.sort, 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