Skip to main content
Glama

list_cloud_resources

Retrieve and filter cloud resources from AWS, GCP, Azure, or Linode to identify security risks and compliance issues in your environment.

Instructions

List cloud resources for a specific provider with optional filtering

Input Schema

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

Implementation Reference

  • The main handler function that implements the core logic of the 'list_cloud_resources' tool. It constructs API parameters and calls the RadSecurityClient to fetch cloud resources.
    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, used for validation in registration.
    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:194-200 (registration)
    Registration of the tool in the ListTools response, specifying name, description, and input schema.
    name: "list_cloud_resources", description: "List cloud resources for a specific provider with optional filtering", inputSchema: zodToJsonSchema( cloudInventory.ListCloudResourcesSchema ), },
  • src/index.ts:838-854 (registration)
    Handler dispatch in the CallToolRequest switch case, where input is validated and the cloudInventory.listCloudResources function is invoked.
    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