Skip to main content
Glama
code-alchemist01

MCP Cloud Services Server

list_resources

List cloud resources across AWS, Azure, or GCP to view instances, storage, databases, or functions. Filter by provider, type, and region to manage multi-cloud infrastructure.

Instructions

List cloud resources (instances, storage, databases, functions) across AWS, Azure, or GCP

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
providerYesCloud provider
typeNoResource type to listall
regionNoRegion to filter resources

Implementation Reference

  • The core handler logic for the 'list_resources' tool. It parses input parameters, selects the cloud provider adapter (AWS, Azure, or GCP), lists specified resource types (instances, storage, databases, functions), and returns a structured object with the results.
    case 'list_resources': {
      const resourceType = (params.type as string) || 'all';
      const region = params.region as string;
    
      if (provider === 'aws') {
        const adapter = new AWSAdapter(region);
        const results: Record<string, unknown[]> = {};
    
        if (resourceType === 'all' || resourceType === 'instance') {
          results.instances = await adapter.listEC2Instances();
        }
        if (resourceType === 'all' || resourceType === 'storage') {
          results.storage = await adapter.listS3Buckets();
        }
        if (resourceType === 'all' || resourceType === 'function') {
          results.functions = await adapter.listLambdaFunctions();
        }
        if (resourceType === 'all' || resourceType === 'database') {
          results.databases = await adapter.listRDSInstances();
        }
    
        return results;
      } else if (provider === 'azure') {
        const adapter = new AzureAdapter(undefined, region);
        const results: Record<string, unknown[]> = {};
    
        if (resourceType === 'all' || resourceType === 'instance') {
          results.instances = await adapter.listVirtualMachines();
        }
        if (resourceType === 'all' || resourceType === 'storage') {
          results.storage = await adapter.listStorageAccounts();
        }
    
        return results;
      } else if (provider === 'gcp') {
        const adapter = new GCPAdapter(undefined, region);
        const results: Record<string, unknown[]> = {};
    
        if (resourceType === 'all' || resourceType === 'instance') {
          results.instances = await adapter.listComputeInstances();
        }
        if (resourceType === 'all' || resourceType === 'storage') {
          results.storage = await adapter.listStorageBuckets();
        }
        if (resourceType === 'all' || resourceType === 'function') {
          results.functions = await adapter.listCloudFunctions();
        }
    
        return results;
      }
      throw new Error(`Unsupported provider: ${provider}`);
    }
  • The tool definition including name, description, and inputSchema for validation of parameters (provider required, type and region optional).
    {
      name: 'list_resources',
      description: 'List cloud resources (instances, storage, databases, functions) across AWS, Azure, or GCP',
      inputSchema: {
        type: 'object',
        properties: {
          provider: {
            type: 'string',
            enum: ['aws', 'azure', 'gcp'],
            description: 'Cloud provider',
          },
          type: {
            type: 'string',
            enum: ['instance', 'storage', 'database', 'function', 'all'],
            description: 'Resource type to list',
            default: 'all',
          },
          region: {
            type: 'string',
            description: 'Region to filter resources',
          },
        },
        required: ['provider'],
      },
    },
  • src/server.ts:19-27 (registration)
    The 'resourceManagementTools' array (containing 'list_resources') is spread into 'allTools', which is returned by the MCP listTools handler to advertise available tools.
    const allTools = [
      ...awsTools,
      ...azureTools,
      ...gcpTools,
      ...resourceManagementTools,
      ...costAnalysisTools,
      ...monitoringTools,
      ...securityTools,
    ];
  • src/server.ts:70-71 (registration)
    Dispatch logic in the MCP callTool handler that routes 'list_resources' calls (matched via resourceManagementTools) to the handleResourceManagementTool function.
    } else if (resourceManagementTools.some((t) => t.name === name)) {
      result = await handleResourceManagementTool(name, args || {});
Behavior2/5

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

With no annotations provided, the description carries full burden but lacks behavioral details. It states it 'lists' resources but doesn't disclose pagination, rate limits, permissions required, whether it's a read-only operation, or what the output format looks like. The description is minimal and doesn't compensate for the missing annotations.

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. Every word earns its place with no redundancy or fluff, making it easy to parse quickly.

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 complexity of listing resources across multiple cloud providers, no annotations, and no output schema, the description is insufficient. It doesn't explain what 'list' entails (e.g., format, pagination), authentication needs, or how it differs from the many sibling list tools, leaving significant gaps for an AI agent.

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 three parameters. The description adds no additional parameter semantics beyond implying the tool works across multiple cloud providers, which is already covered by the 'provider' enum. Baseline 3 is appropriate when 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 verb 'list' and resource 'cloud resources', specifying the scope across AWS, Azure, or GCP. It distinguishes from siblings like 'get_resource' (singular) and 'analyze_costs' (different operation), but doesn't explicitly differentiate from provider-specific list tools (e.g., 'aws_list_ec2_instances').

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?

No guidance on when to use this tool versus alternatives is provided. It doesn't mention when to prefer this cross-provider tool over the many provider-specific list tools (e.g., 'aws_list_ec2_instances'), nor does it indicate prerequisites like authentication or account setup.

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/code-alchemist01/Cloud-mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server