Skip to main content
Glama
vedantparmar12

Azure Omni-Tool MCP Server

azure_service

Interact with Azure services including Storage, Cosmos DB, Key Vault, and others to manage resources, query data, and configure settings through structured actions.

Instructions

Interact with specific Azure services.

SERVICES: storage, cosmos, search, kusto, monitor, appconfig, keyvault, postgres

STORAGE actions: list, listContainers, listBlobs, getContainer, listTables, queryTable COSMOS actions: list, listDatabases, listContainers, query, getContainer SEARCH actions: list, listIndexes, getIndex, query, getService KUSTO actions: list, listDatabases, listTables, getSchema, sample, query MONITOR actions: list, getWorkspace, listTables, query, listMetrics, getMetrics APPCONFIG actions: list, getStore, listKeyValues, getKeyValue, setKeyValue, lock, unlock KEYVAULT actions: list, getVault, listKeys, getKey, createKey, listSecrets, getSecret, listCertificates POSTGRES actions: list, getServer, listDatabases, listParameters, getParameter, listTables, getTableSchema, query

Pass required params for each action (e.g., accountName, resourceGroup, query).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serviceYesAzure service type
actionYesAction to perform
paramsNoAction parameters (varies by service/action)

Implementation Reference

  • The primary handler function for the 'azure_service' tool. It validates the input service and action, retrieves the corresponding service instance and action handler, executes the action, handles success/error cases with auditing and logging, and returns a standardized response.
    export async function handleAzureService(input: AzureServiceInput): Promise<AzureServiceResponse> {
        const { service, action, params = {} } = input;
        const operator = getOperatorInfo();
        const audit = createAuditContext(`${service}:${action}`, 'low', 'query');
    
        logger.debug('Service action', { service, action, params });
    
        if (!isValidServiceType(service)) {
            return {
                service,
                action,
                success: false,
                error: `Unknown service. Available: ${listServiceTypes().join(', ')}`,
                correlation_id: audit.correlationId,
                operator,
            };
        }
    
        const handlers = getActionHandlers(service);
        const handler = handlers.get(action);
    
        if (!handler) {
            return {
                service,
                action,
                success: false,
                error: `Unknown action "${action}" for ${service}. Available: ${Array.from(handlers.keys()).join(', ')}`,
                correlation_id: audit.correlationId,
                operator,
            };
        }
    
        try {
            const result = await handler(params);
    
            if (result.success) {
                await audit.logSuccess();
                logger.info('Service action succeeded', { service, action, count: result.count });
            } else {
                await audit.logFailure(result.error || 'Unknown');
                logger.warn('Service action failed', { service, action, error: result.error });
            }
    
            return {
                service,
                action,
                success: result.success,
                data: result.data,
                count: result.count,
                error: result.error,
                correlation_id: audit.correlationId,
                operator,
            };
        } catch (err) {
            const error = err instanceof Error ? err.message : String(err);
            await audit.logFailure(error);
            logger.error('Service action error', err instanceof Error ? err : new Error(error));
    
            return {
                service,
                action,
                success: false,
                error,
                correlation_id: audit.correlationId,
                operator,
            };
        }
    }
  • Zod schema for validating and parsing inputs to the azure_service tool, defining service type (enum), action (string), and optional params (record of strings).
    export const AzureServiceSchema = z.object({
        service: z.enum(['storage', 'cosmos', 'search', 'kusto', 'monitor', 'appconfig', 'keyvault', 'postgres'])
            .describe('Azure service type'),
        action: z.string().describe('Action: list, get, query, etc.'),
        params: z.record(z.string()).optional().describe('Action parameters'),
    });
  • src/index.ts:33-37 (registration)
    Registration of the 'azure_service' tool in the central toolRegistry map, associating the tool definition, Zod schema, and handler function.
    ['azure_service', {
        tool: azureServiceTool,
        schema: AzureServiceSchema,
        handler: args => handleAzureService(AzureServiceSchema.parse(args))
    }],
  • Helper function that dynamically builds a map of action handlers for a given Azure service type, delegating to specific service instances (e.g., StorageService.list). Covers all supported services and their actions.
    function getActionHandlers(serviceType: ServiceType): Map<string, ActionHandler> {
        const handlers = new Map<string, ActionHandler>();
    
        switch (serviceType) {
            case 'storage': {
                const svc = getService<StorageService>('storage');
                handlers.set('list', p => svc.list(p.resourceGroup));
                handlers.set('listContainers', p => svc.listContainers(p.accountName));
                handlers.set('listBlobs', p => svc.listBlobs(p.accountName, p.containerName));
                handlers.set('getContainer', p => svc.getContainerProperties(p.accountName, p.containerName));
                handlers.set('listTables', p => svc.listTables(p.accountName));
                handlers.set('queryTable', p => svc.queryTable(p.accountName, p.tableName, p.filter));
                break;
            }
            case 'cosmos': {
                const svc = getService<CosmosService>('cosmos');
                handlers.set('list', p => svc.list(p.resourceGroup));
                handlers.set('listDatabases', p => svc.listDatabases(p.accountName, p.resourceGroup));
                handlers.set('listContainers', p => svc.listContainers(p.accountName, p.resourceGroup, p.databaseName));
                handlers.set('query', p => svc.queryContainer(p.accountName, p.resourceGroup, p.databaseName, p.containerName, p.query));
                handlers.set('getContainer', p => svc.getContainer(p.accountName, p.resourceGroup, p.databaseName, p.containerName));
                break;
            }
            case 'search': {
                const svc = getService<SearchService>('search');
                handlers.set('list', p => svc.list(p.resourceGroup));
                handlers.set('listIndexes', p => svc.listIndexes(p.serviceName, p.resourceGroup));
                handlers.set('getIndex', p => svc.getIndex(p.serviceName, p.resourceGroup, p.indexName));
                handlers.set('query', p => {
                    const top = p.top ? parseInt(p.top, 10) : undefined;
                    if (top !== undefined && isNaN(top)) return Promise.reject(new Error(`Invalid 'top': '${p.top}' is not a number.`));
                    return svc.queryIndex(p.serviceName, p.resourceGroup, p.indexName, p.searchText, top);
                });
                handlers.set('getService', p => svc.getServiceDetails(p.serviceName, p.resourceGroup));
                break;
            }
            case 'kusto': {
                const svc = getService<KustoService>('kusto');
                handlers.set('list', p => svc.list(p.resourceGroup));
                handlers.set('listDatabases', p => svc.listDatabases(p.clusterName, p.resourceGroup));
                handlers.set('listTables', p => svc.listTables(p.clusterName, p.resourceGroup, p.databaseName));
                handlers.set('getSchema', p => svc.getTableSchema(p.clusterName, p.resourceGroup, p.databaseName, p.tableName));
                handlers.set('sample', p => {
                    const count = parseInt(p.count ?? '10', 10);
                    if (isNaN(count) || count < 1 || !Number.isInteger(count)) return Promise.reject(new Error(`Invalid count: '${p.count}'. Must be positive integer.`));
                    return svc.sampleTable(p.clusterName, p.resourceGroup, p.databaseName, p.tableName, count);
                });
                handlers.set('query', p => svc.runKql(p.clusterName, p.resourceGroup, p.databaseName, p.query));
                break;
            }
            case 'monitor': {
                const svc = getService<MonitorService>('monitor');
                handlers.set('list', p => svc.list(p.resourceGroup));
                handlers.set('getWorkspace', p => svc.getWorkspace(p.workspaceName, p.resourceGroup));
                handlers.set('listTables', p => svc.listTables(p.workspaceName, p.resourceGroup));
                handlers.set('query', p => svc.queryLogs(p.workspaceId, p.query, p.timespan));
                handlers.set('listMetrics', p => svc.listMetricDefinitions(p.resourceId));
                handlers.set('getMetrics', p => svc.getMetrics(p.resourceId, p.metrics, p.interval));
                break;
            }
            case 'appconfig': {
                const svc = getService<AppConfigService>('appconfig');
                handlers.set('list', p => svc.list(p.resourceGroup));
                handlers.set('getStore', p => svc.getStore(p.storeName, p.resourceGroup));
                handlers.set('listKeyValues', p => svc.listKeyValues(p.storeName, p.label));
                handlers.set('getKeyValue', p => svc.getKeyValue(p.storeName, p.key, p.label));
                handlers.set('setKeyValue', p => svc.setKeyValue(p.storeName, p.key, p.value, p.label));
                handlers.set('lock', p => svc.lockKeyValue(p.storeName, p.key, p.label));
                handlers.set('unlock', p => svc.unlockKeyValue(p.storeName, p.key, p.label));
                break;
            }
            case 'keyvault': {
                const svc = getService<KeyVaultService>('keyvault');
                handlers.set('list', p => svc.list(p.resourceGroup));
                handlers.set('getVault', p => svc.getVault(p.vaultName, p.resourceGroup));
                handlers.set('listKeys', p => svc.listKeys(p.vaultName));
                handlers.set('getKey', p => svc.getKey(p.vaultName, p.keyName));
                handlers.set('createKey', p => svc.createKey(p.vaultName, p.keyName, p.keyType || 'RSA'));
                handlers.set('listSecrets', p => svc.listSecrets(p.vaultName));
                handlers.set('getSecret', p => svc.getSecret(p.vaultName, p.secretName));
                handlers.set('listCertificates', p => svc.listCertificates(p.vaultName));
                break;
            }
            case 'postgres': {
                const svc = getService<PostgresService>('postgres');
                handlers.set('list', p => svc.list(p.resourceGroup));
                handlers.set('getServer', p => svc.getServer(p.serverName, p.resourceGroup));
                handlers.set('listDatabases', p => svc.listDatabases(p.serverName, p.resourceGroup));
                handlers.set('listParameters', p => svc.listParameters(p.serverName, p.resourceGroup));
                handlers.set('getParameter', p => svc.getServerParameter(p.serverName, p.resourceGroup, p.paramName));
                handlers.set('listTables', p => svc.listTables(p.serverName, p.resourceGroup, p.databaseName));
                handlers.set('getTableSchema', p => svc.getTableSchema(p.serverName, p.resourceGroup, p.databaseName, p.tableName));
                handlers.set('query', p => svc.executeQuery(p.serverName, p.resourceGroup, p.databaseName, p.query));
                break;
            }
        }
    
        return handlers;
    }
  • Tool object definition including name, description, and JSON inputSchema matching the Zod schema, used for MCP tool listing and validation.
    export const azureServiceTool = {
        name: 'azure_service',
        description: `Interact with specific Azure services.
    
    SERVICES: storage, cosmos, search, kusto, monitor, appconfig, keyvault, postgres
    
    STORAGE actions: list, listContainers, listBlobs, getContainer, listTables, queryTable
    COSMOS actions: list, listDatabases, listContainers, query, getContainer
    SEARCH actions: list, listIndexes, getIndex, query, getService
    KUSTO actions: list, listDatabases, listTables, getSchema, sample, query
    MONITOR actions: list, getWorkspace, listTables, query, listMetrics, getMetrics
    APPCONFIG actions: list, getStore, listKeyValues, getKeyValue, setKeyValue, lock, unlock
    KEYVAULT actions: list, getVault, listKeys, getKey, createKey, listSecrets, getSecret, listCertificates
    POSTGRES actions: list, getServer, listDatabases, listParameters, getParameter, listTables, getTableSchema, query
    
    Pass required params for each action (e.g., accountName, resourceGroup, query).`,
        inputSchema: {
            type: 'object',
            properties: {
                service: {
                    type: 'string',
                    enum: ['storage', 'cosmos', 'search', 'kusto', 'monitor', 'appconfig', 'keyvault', 'postgres'],
                    description: 'Azure service type'
                },
                action: { type: 'string', description: 'Action to perform' },
                params: {
                    type: 'object',
                    description: 'Action parameters (varies by service/action)',
                    additionalProperties: { type: 'string' }
                },
            },
            required: ['service', 'action'],
        },
    };
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. While it lists services and actions, it doesn't explain what 'interact' entails - whether operations are read-only or mutating, authentication requirements, rate limits, error behaviors, or response formats. For a complex multi-service tool with potential write operations (e.g., setKeyValue, createKey), this 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.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized but poorly structured. The initial sentence is clear, but the extensive bullet-like listing of services and actions could be better organized. While all content is relevant, the presentation lacks hierarchy and some redundancy exists (e.g., 'list' appears for nearly every service).

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 complex tool supporting 8 services with 3-8 actions each, no output schema, and no annotations, the description is incomplete. It lists available operations but doesn't explain what they return, how to interpret results, error handling, or authentication requirements. The gap between tool complexity and description detail is substantial.

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 all three parameters. The description adds some value by listing service options and example actions, but doesn't provide additional semantic context beyond what's in the schema. The mention of 'required params for each action' is too vague to significantly enhance parameter understanding.

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 tool 'interacts with specific Azure services' and lists all eight supported services, providing a specific verb ('interact') and resource scope ('Azure services'). However, it doesn't explicitly distinguish this tool from its siblings (get_azure_context, manage_azure_resources), which would be needed for a score of 5.

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 its siblings (get_azure_context, manage_azure_resources). It lists available services and actions but offers no context about appropriate use cases, prerequisites, or exclusions. The final sentence about passing required parameters is operational rather than guidance.

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/vedantparmar12/Azure-_MCP'

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