Skip to main content
Glama

list_control_resources

Retrieve cloud resources linked to specific compliance controls to verify regulatory adherence and identify security gaps.

Instructions

List cloud resources associated with a specific compliance control

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
control_nameYesName of the compliance control
datasource_idsYesComma-separated datasource IDs (e.g. AWS Account IDs)
pageNoPage number starting from 1
page_sizeNoPage size

Implementation Reference

  • The handler function that executes the core logic: makes an API request to the RAD Security backend to list cloud resources failing/passing a specific compliance control.
    /** * List resources associated with a specific compliance control. */ export async function listControlResources( client: RadSecurityClient, controlName: string, datasourceIds: string, page?: number, pageSize?: number ): Promise<any> { const params: Record<string, any> = { datasource_ids: datasourceIds }; if (page !== undefined) { params.page = page; } if (pageSize !== undefined) { params.page_size = pageSize; } return client.makeRequest( `/accounts/${client.getAccountId()}/compliance/cloud/controls/${encodeURIComponent(controlName)}/resources`, params ); }
  • Zod schema defining the input parameters for the tool, used for validation in registration and call handler.
    // Schema for list_control_resources export const ListControlResourcesSchema = z.object({ control_name: z.string().describe("Name of the compliance control"), datasource_ids: z.string().describe("Comma-separated datasource IDs (e.g. AWS Account IDs)"), page: z.number().optional().describe("Page number starting from 1"), page_size: z.number().optional().describe("Page size"), });
  • src/index.ts:270-277 (registration)
    Tool registration in the ListTools handler: defines the tool name, description, and converts Zod schema to JSON schema for MCP protocol.
    { name: "list_control_resources", description: "List cloud resources associated with a specific compliance control", inputSchema: zodToJsonSchema( cloudCompliance.ListControlResourcesSchema ), },
  • src/index.ts:985-1001 (registration)
    Tool invocation handler in the CallToolRequest switch: validates input with schema, calls the handler function, and formats response as MCP content.
    case "list_control_resources": { const args = cloudCompliance.ListControlResourcesSchema.parse( request.params.arguments ); const response = await cloudCompliance.listControlResources( client, args.control_name, args.datasource_ids, args.page, args.page_size ); 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