Skip to main content
Glama
rad-security

RAD Security

Official
by rad-security

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) },
        ],
      };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool lists resources with filtering but doesn't describe critical behaviors like pagination handling (implied by offset/limit parameters), rate limits, authentication requirements, error conditions, or the format/structure of returned data. For a list operation with 5 parameters and no output schema, this leaves significant gaps in understanding how the tool behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary words. It directly states the action, target, and key feature (optional filtering), earning its place with zero waste. This is appropriately concise for a tool with a clear schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (5 parameters, no annotations, no output schema), the description is incomplete. It lacks behavioral context (e.g., pagination, errors), doesn't differentiate from siblings, and provides minimal guidance. While the schema covers parameters well, the description fails to compensate for missing annotations and output schema, leaving the agent under-informed about how to effectively use this tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 5 parameters with descriptions and defaults. The description adds no additional parameter semantics beyond implying filtering is optional. It doesn't explain filter syntax beyond the schema's example, clarify provider-specific nuances, or detail interactions between parameters like 'filters' and 'q'. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'List cloud resources for a specific provider with optional filtering.' It specifies the verb ('list'), resource ('cloud resources'), and scope ('specific provider'), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'list_clusters' or 'list_k8s_resources' that might also list cloud resources, preventing a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'list_clusters' or 'list_k8s_resources' that might overlap in functionality, nor does it specify prerequisites, exclusions, or contextual triggers for usage. The agent must infer usage from the name and parameters alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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