list_compliance_controls
View compliance control summaries for cloud accounts, filter by status and providers to monitor security posture.
Instructions
List all compliance control summaries for the account
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | Filter by failure status: failing or passing | |
| providers | No | Comma-separated list of cloud providers (aws, azure, gcp, linode) | |
| page | No | Page number starting from 1 | |
| page_size | No | Page size |
Implementation Reference
- The handler function that implements the core logic for the 'list_compliance_controls' tool by making an API request to retrieve compliance control summaries.export async function listComplianceControls( client: RadSecurityClient, status?: string, providers?: string, page?: number, pageSize?: number ): Promise<any> { const params: Record<string, any> = {}; if (status) { params.status = status; } if (providers) { params.providers = providers; } if (page !== undefined) { params.page = page; } if (pageSize !== undefined) { params.page_size = pageSize; } return client.makeRequest( `/accounts/${client.getAccountId()}/compliance/cloud/controls`, params ); }
- Zod schema defining the input parameters and validation for the 'list_compliance_controls' tool.// Schema for list_compliance_controls export const ListComplianceControlsSchema = z.object({ status: z.enum(["failing", "passing"]).optional().describe("Filter by failure status: failing or passing"), providers: z.string().optional().describe("Comma-separated list of cloud providers (aws, azure, gcp, linode)"), page: z.number().optional().describe("Page number starting from 1"), page_size: z.number().optional().describe("Page size"), });
- src/index.ts:255-261 (registration)Registration of the 'list_compliance_controls' tool in the ListTools response, including name, description, and input schema.name: "list_compliance_controls", description: "List all compliance control summaries for the account", inputSchema: zodToJsonSchema( cloudCompliance.ListComplianceControlsSchema ), },
- src/index.ts:953-969 (registration)Handler registration in the CallTool switch statement that parses arguments, calls the listComplianceControls function, and formats the response.case "list_compliance_controls": { const args = cloudCompliance.ListComplianceControlsSchema.parse( request.params.arguments ); const response = await cloudCompliance.listComplianceControls( client, args.status, args.providers, args.page, args.page_size ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2) }, ], }; }