Skip to main content
Glama

list-resource-groups

Retrieve all resource groups within your Azure subscription to manage and organize cloud resources effectively.

Instructions

List all resource groups in the selected subscription

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Tool registration defining the name, description, and empty input schema in the listTools response.
    {
      name: "list-resource-groups",
      description: "List all resource groups in the selected subscription",
      inputSchema: {
        type: "object",
        properties: {},
        required: [],
      },
  • Wrapper handler method that implements caching and error handling, delegating to AzureOperations.listResourceGroups()
    private async handleListResourceGroups() {
      if (!this.context.resourceClient) {
        throw new AzureMCPError("Client not initialized", "NO_CLIENT");
      }
    
      try {
        const cacheKey = `resource-groups-${this.context.selectedSubscription}`;
        return await this.getCachedResource(
          cacheKey,
          async () => {
            // Use azureOperations to handle the business logic
            return await this.azureOperations.listResourceGroups();
          },
          30000
        );
      } catch (error) {
        this.logWithContext("error", `Error listing resource groups: ${error}`, {
          error,
        });
        throw new AzureResourceError(`Failed to list resource groups: ${error}`);
      }
    }
  • Core implementation in AzureOperations class that iterates over ResourceManagementClient.resourceGroups.list() to collect and return resource group details (id, name, location, tags).
    async listResourceGroups() {
      if (!this.context.resourceClient) {
        throw new AzureMCPError("Client not initialized", "NO_CLIENT");
      }
    
      const resourceGroups = [];
      for await (const group of this.context.resourceClient.resourceGroups.list()) {
        resourceGroups.push({
          id: group.id,
          name: group.name,
          location: group.location,
          tags: group.tags || {},
        });
      }
    
      return resourceGroups;
    }
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 only states what the tool does, not behavioral traits like whether it requires authentication, has rate limits, returns paginated results, or what format the output takes. This is inadequate for a tool with zero annotation coverage.

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 any wasted words. It's appropriately sized for a simple list operation with no parameters.

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

Completeness3/5

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

For a simple list tool with no parameters and no output schema, the description covers the basic action but lacks context about authentication, subscription selection, or output format. It's minimally viable but has clear gaps given the lack of annotations.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, earning a baseline high score since it doesn't need to compensate for gaps.

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 action ('List all') and resource ('resource groups in the selected subscription'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'get-resource-details' or 'list-role-assignments', which prevents 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 like 'get-resource-details' or 'list-tenants'. It mentions 'selected subscription' but doesn't explain how that selection occurs or prerequisites, leaving usage context unclear.

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/kalivaraprasad-gonapa/azure-mcp'

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