Skip to main content
Glama

get-resource-details

Retrieve detailed information about Azure resources by providing their resource ID to manage and monitor cloud infrastructure.

Instructions

Get detailed information about a specific resource

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resourceIdYesAzure Resource ID

Implementation Reference

  • Registration of the 'get-resource-details' tool in the listTools response, including name, description, and input schema.
      name: "get-resource-details",
      description: "Get detailed information about a specific resource",
      inputSchema: {
        type: "object",
        properties: {
          resourceId: {
            type: "string",
            description: "Azure Resource ID",
          },
        },
        required: ["resourceId"],
      },
    },
  • Main handler function for 'get-resource-details' tool. Validates input, handles caching, and delegates to AzureOperations.getResource for the actual retrieval.
    private async handleGetResourceDetails(args: any) {
      const { resourceId } = z
        .object({
          resourceId: z.string().min(1, "Resource ID cannot be empty"),
        })
        .parse(args);
    
      if (!this.context.resourceClient) {
        throw new AzureMCPError("Client not initialized", "NO_CLIENT");
      }
    
      try {
        // The resource ID format is: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{provider}/{resourceType}/{resourceName}
        const parts = resourceId.split("/");
        if (parts.length < 8) {
          throw new AzureResourceError("Invalid resource ID format");
        }
    
        const cacheKey = `resource-${resourceId}`;
        const resource = await this.getCachedResource(
          cacheKey,
          async () => {
            // Use azureOperations to get the resource
            return await this.azureOperations.getResource(resourceId);
          },
          60000
        ); // Cache for 1 minute
    
        return {
          id: resource.id,
          name: resource.name,
          type: resource.type,
          location: resource.location,
          tags: resource.tags || {},
          properties: resource.properties || {},
        };
      } catch (error) {
        this.logWithContext("error", `Error getting resource details: ${error}`, {
          error,
        });
        throw new AzureResourceError(`Failed to get resource details: ${error}`);
      }
    }
  • Helper method in AzureOperations class that executes the Azure SDK call to get resource details by resource ID.
    async getResource(resourceId: string) {
      if (!this.context.resourceClient) {
        throw new AzureMCPError("Client not initialized", "NO_CLIENT");
      }
    
      return await this.context.resourceClient.resources.getById(
        resourceId,
        "latest"
      );
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a read operation ('Get'), but doesn't cover critical aspects like authentication requirements, rate limits, error conditions, or what 'detailed information' entails. 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 with zero wasted words. It's appropriately sized for a simple lookup tool and front-loads the core purpose immediately.

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 no annotations and no output schema, the description is incomplete. It doesn't explain what 'detailed information' includes, potential response formats, or behavioral constraints. For a tool with zero structured metadata, this leaves 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 already documents the 'resourceId' parameter as an Azure Resource ID. The description adds no additional parameter semantics beyond implying it fetches details for 'a specific resource', which aligns with the schema but doesn't provide 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 ('Get') and resource ('detailed information about a specific resource'), making the purpose understandable. However, it doesn't differentiate this tool from potential sibling read operations like 'get-role-definitions' or 'get-user-permissions' beyond the generic 'resource' reference.

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 prerequisites (e.g., needing a resource ID), exclusions, or comparisons to sibling tools like 'list-resource-groups' for broader queries.

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