Skip to main content
Glama
dhippley

Azure Topology Graph MCP Server

by dhippley

get_resource

Retrieve detailed information about a specific Azure resource using its full resource ID to analyze infrastructure components.

Instructions

Get detailed information about a specific Azure resource

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resourceIdYesFull Azure resource ID

Implementation Reference

  • src/server.ts:357-370 (registration)
    Registration of the 'get_resource' tool in the ListTools response, including name, description, and input schema definition.
    {
      name: 'get_resource',
      description: 'Get detailed information about a specific Azure resource',
      inputSchema: {
        type: 'object',
        properties: {
          resourceId: {
            type: 'string',
            description: 'Full Azure resource ID',
          },
        },
        required: ['resourceId'],
      },
    },
  • Handler implementation for the 'get_resource' tool. It fetches the topology, finds the resource by ID, and returns formatted details including name, type, group, location, subscription, ID, tags, and properties.
    case 'get_resource': {
      const { resourceId } = args as { resourceId: string };
      const topology = await buildTopology();
      const resource = topology.nodes.find(n => n.id === resourceId);
      
      if (!resource) {
        throw new McpError(ErrorCode.InvalidRequest, `Resource not found: ${resourceId}`);
      }
      
      return {
        content: [
          {
            type: 'text',
            text: `Resource Details:\n\n` +
              `Name: ${resource.name}\n` +
              `Type: ${resource.type}\n` +
              `Resource Group: ${resource.resourceGroup}\n` +
              `Location: ${resource.location}\n` +
              `Subscription: ${resource.subscriptionId}\n` +
              `ID: ${resource.id}\n\n` +
              (resource.tags ? `Tags: ${JSON.stringify(resource.tags, null, 2)}\n\n` : '') +
              (resource.properties ? `Properties: ${JSON.stringify(resource.properties, null, 2)}` : ''),
          },
        ],
      };
    }

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/dhippley/azure_mcp_graph'

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