Skip to main content
Glama
code-alchemist01

MCP Cloud Services Server

azure_list_storage_accounts

List all Azure Storage Accounts to manage cloud storage resources, retrieve account details, and monitor storage configurations across subscriptions.

Instructions

List all Storage Accounts in Azure

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
subscriptionIdNoAzure subscription ID
locationNoAzure location/regioneastus

Implementation Reference

  • The switch case handler for 'azure_list_storage_accounts' that calls the adapter to list accounts and formats the response with total and mapped account details.
    case 'azure_list_storage_accounts': {
      const accounts = await adapter.listStorageAccounts();
      return {
        total: accounts.length,
        storageAccounts: accounts.map((account) => ({
          id: account.id,
          name: account.accountName,
          resourceGroup: account.resourceGroup,
          location: account.location,
          kind: account.kind,
          sku: account.sku,
        })),
      };
    }
  • Tool definition including name, description, and input schema for subscriptionId (required) and location (optional, default 'eastus').
    {
      name: 'azure_list_storage_accounts',
      description: 'List all Storage Accounts in Azure',
      inputSchema: {
        type: 'object',
        properties: {
          subscriptionId: {
            type: 'string',
            description: 'Azure subscription ID',
          },
          location: {
            type: 'string',
            description: 'Azure location/region',
            default: 'eastus',
          },
        },
      },
    },
  • Implements the core logic to list Azure storage accounts using StorageManagementClient, populating details like ID, name, resource group, location, kind, SKU, etc.
    async listStorageAccounts(): Promise<AzureStorageAccount[]> {
      await this.initializeClients();
      if (!this.storageClient) throw new Error('Storage client not initialized');
    
      try {
        const accounts: AzureStorageAccount[] = [];
        const accountList = this.storageClient.storageAccounts.list();
    
        for await (const account of accountList) {
          if (account.id && account.name) {
            accounts.push({
              id: account.id,
              type: 'storage',
              name: account.name,
              resourceGroup: this.extractResourceGroup(account.id),
              location: account.location || this.location,
              status: 'running',
              accountName: account.name,
              kind: account.kind || '',
              sku: account.sku?.name,
              accessTier: account.accessTier,
              tags: account.tags,
            });
          }
        }
    
        return accounts;
      } catch (error) {
        throw new Error(`Failed to list storage accounts: ${error instanceof Error ? error.message : String(error)}`);
      }
    }
  • src/server.ts:19-27 (registration)
    Registers all tools including azureTools (containing 'azure_list_storage_accounts') into the main allTools array used for MCP listTools response.
    const allTools = [
      ...awsTools,
      ...azureTools,
      ...gcpTools,
      ...resourceManagementTools,
      ...costAnalysisTools,
      ...monitoringTools,
      ...securityTools,
    ];
  • src/server.ts:66-67 (registration)
    Registers the routing for azure tools including 'azure_list_storage_accounts' to the specific handleAzureTool function.
    } else if (azureTools.some((t) => t.name === name)) {
      result = await handleAzureTool(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 for behavioral disclosure but only states the basic operation. It doesn't mention authentication requirements, rate limits, pagination behavior, or what format the results will be in. For a tool that presumably returns potentially large lists of resources, this lack of behavioral context is a significant gap.

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 extremely concise - a single sentence that directly states the tool's purpose without any unnecessary words. It's front-loaded with the core functionality and wastes no space on redundant information.

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?

For a tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what information will be returned about storage accounts, whether there are limitations on the listing, authentication requirements, or how results are structured. The context signals show this is a non-trivial operation (2 parameters, no output schema) that needs more descriptive context.

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 already fully documents both parameters (subscriptionId and location). The description adds no additional parameter information beyond what's in the schema. This meets the baseline expectation when schema coverage is complete, but doesn't provide any extra value.

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 ('Storage Accounts in Azure'), making the purpose immediately understandable. However, it doesn't distinguish this tool from sibling tools like 'list_resources' or 'azure_list_virtual_machines' - it's clear what it does but not how it differs from similar listing tools.

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. With sibling tools like 'list_resources', 'azure_list_virtual_machines', and various AWS/GCP listing tools available, there's no indication of when this specific Azure storage account listing is preferred or what distinguishes it from other resource listing operations.

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