Skip to main content
Glama

list_cloud_resources

List and filter cloud resources across AWS, GCP, Azure, and Linode for security insights with pagination and search capabilities. Integrates with RAD Security for Kubernetes and cloud environment analysis.

Instructions

List cloud resources for a specific provider with optional filtering

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filtersNoFilter string (e.g., 'resource_type:EC2NetworkInterface,resource_type:SQSQueue,aws_account:123456789012,compliance:not_compliant')
limitNoMaximum number of results to return
offsetNoPagination offset. Default: 0
providerYesCloud provider (aws, gcp, azure, linode)
qNoFree text search query

Implementation Reference

  • The main handler function that executes the logic to list cloud resources for a given provider using the RadSecurityClient's makeRequest method.
    export async function listCloudResources( client: RadSecurityClient, provider: ProviderType, filters?: string, offset?: number, limit: number = 20, q?: string ): Promise<any> { const params: Record<string, any> = { limit }; if (filters) { params.filter = filters; } if (offset !== undefined) { params.offset = offset; } if (q) { params.q = q; } return client.makeRequest( `/accounts/${client.getAccountId()}/cloud-inventory/v1/${provider}`, params ); }
  • Zod schema defining the input parameters for the list_cloud_resources tool, including provider, filters, offset, limit, and query.
    // Schema for list_cloud_resources export const ListCloudResourcesSchema = z.object({ provider: ProviderTypeEnum.describe("Cloud provider (aws, gcp, azure, linode)"), filters: z.string().optional().describe("Filter string (e.g., 'resource_type:EC2NetworkInterface,resource_type:SQSQueue,aws_account:123456789012,compliance:not_compliant')"), offset: z.number().optional().describe("Pagination offset. Default: 0"), limit: z.number().optional().default(20).describe("Maximum number of results to return"), q: z.string().optional().describe("Free text search query"), });
  • src/index.ts:162-166 (registration)
    Tool registration in the listTools handler, defining the name, description, and input schema for list_cloud_resources.
    { name: "list_cloud_resources", description: "List cloud resources for a specific provider with optional filtering", inputSchema: zodToJsonSchema(cloudInventory.ListCloudResourcesSchema), },
  • src/index.ts:469-481 (registration)
    Dispatcher case in the CallToolRequest handler that parses arguments and calls the listCloudResources function.
    case "list_cloud_resources": { const args = cloudInventory.ListCloudResourcesSchema.parse(request.params.arguments); const response = await cloudInventory.listCloudResources( client, args.provider, args.filters, args.offset, args.limit, 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