Skip to main content
Glama
dhippley

Azure Topology Graph MCP Server

by dhippley

search_resources

Search Azure resources by name, type, or properties to find infrastructure components for analysis and visualization.

Instructions

Search Azure resources by name, type, or other properties

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query (searches name, type, resource group, location, tags)
resourceTypeNoOptional filter by resource type

Implementation Reference

  • The core handler function `searchResources` that builds the topology graph if needed and filters resources matching the query across name, type, resource group, location, and tags, with optional type filter.
    async function searchResources(query: string, resourceType?: string): Promise<GraphNode[]> {
      const topology = await buildTopology();
      const searchLower = query.toLowerCase();
      
      return topology.nodes.filter(node => {
        const matchesQuery = 
          node.name.toLowerCase().includes(searchLower) ||
          node.type.toLowerCase().includes(searchLower) ||
          node.resourceGroup.toLowerCase().includes(searchLower) ||
          node.location.toLowerCase().includes(searchLower) ||
          (node.tags && Object.values(node.tags).some(tag => 
            tag.toLowerCase().includes(searchLower)
          ));
        
        const matchesType = !resourceType || node.type.toLowerCase().includes(resourceType.toLowerCase());
        
        return matchesQuery && matchesType;
      });
    }
  • Input schema definition for the search_resources tool.
    inputSchema: {
      type: 'object',
      properties: {
        query: {
          type: 'string',
          description: 'Search query (searches name, type, resource group, location, tags)',
        },
        resourceType: {
          type: 'string',
          description: 'Optional filter by resource type',
        },
      },
      required: ['query'],
    },
  • src/server.ts:339-356 (registration)
    Registration of the search_resources tool in the ListTools handler, providing name, description, and schema.
    {
      name: 'search_resources',
      description: 'Search Azure resources by name, type, or other properties',
      inputSchema: {
        type: 'object',
        properties: {
          query: {
            type: 'string',
            description: 'Search query (searches name, type, resource group, location, tags)',
          },
          resourceType: {
            type: 'string',
            description: 'Optional filter by resource type',
          },
        },
        required: ['query'],
      },
    },
  • Dispatch handler in the CallToolRequestSchema that invokes searchResources and formats the MCP response.
    case 'search_resources': {
      const { query, resourceType } = args as { query: string; resourceType?: string };
      const results = await searchResources(query, resourceType);
      return {
        content: [
          {
            type: 'text',
            text: `Found ${results.length} resources matching "${query}":\n\n` +
              results.map(r => 
                `• ${r.name} (${r.type})\n  Resource Group: ${r.resourceGroup}\n  Location: ${r.location}\n  ID: ${r.id}`
              ).join('\n\n'),
          },
        ],
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions searching by properties but doesn't describe key behaviors like pagination, rate limits, authentication needs, error handling, or what the output looks like (e.g., list of resources with fields). For a search tool with no annotation coverage, this leaves significant gaps in understanding how it operates.

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 directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, with every part contributing to understanding the core functionality.

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 a search operation, no annotations, and no output schema, the description is incomplete. It doesn't explain return values, result format, limitations (e.g., search scope), or behavioral aspects like performance or constraints. For a tool with 2 parameters and no structured support, more context is needed to guide effective use.

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 both parameters ('query' and 'resourceType') with clear descriptions. The description adds minimal value by implying search across multiple properties, but doesn't provide additional syntax, format details, or examples beyond what the schema specifies. Baseline 3 is appropriate when the 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 'search' and the resource 'Azure resources', specifying searchable properties (name, type, or other properties). It distinguishes from siblings like 'get_resource' by indicating a broader search capability rather than retrieving a specific resource. However, it doesn't explicitly differentiate from all siblings (e.g., 'find_path' might also involve searching).

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 when to prefer 'search_resources' over 'get_resource' for specific resource retrieval, or how it differs from 'find_path' or other siblings. There are no explicit usage contexts, exclusions, or prerequisites stated.

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

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