Skip to main content
Glama

azure_acr_setup

Create and configure Azure Container Registry for Docker container deployments in DevOps workflows.

Instructions

Create and configure Azure Container Registry

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'azure_acr_setup' tool. It validates inputs, creates a resource group if needed, and sets up an Azure Container Registry (ACR) using Azure CLI commands.
    export async function azureAcrSetup({ name, resource_group, location, sku }) {
      if (!/^[a-zA-Z0-9]{5,50}$/.test(name)) {
        return {
          content: [{
            type: "text",
            text: `Invalid registry name: "${name}"\n\nRules:\n- 5-50 characters\n- Alphanumeric only (no hyphens or underscores)\n- Must be globally unique`
          }]
        };
      }
    
      // Check if resource group exists
      const rgCheck = await commandRunner(`az group show -n ${resource_group} 2>/dev/null`);
      let output = "";
    
      if (!rgCheck.success) {
        output += `Creating resource group: ${resource_group}...\n`;
        const rgCreate = await commandRunner(`az group create -n ${resource_group} -l ${location}`);
        if (!rgCreate.success) {
          return {
            content: [{
              type: "text",
              text: `Failed to create resource group!\n\nError: ${rgCreate.stderr || rgCreate.error}`
            }]
          };
        }
        output += `Resource group created.\n\n`;
      }
    
      output += `Creating container registry: ${name}...\n`;
      const acrCreate = await commandRunner(
        `az acr create -n ${name} -g ${resource_group} --sku ${sku} --admin-enabled true`,
        { timeout: 120000 }
      );
    
      if (!acrCreate.success) {
        return {
          content: [{
            type: "text",
            text: `Failed to create registry!\n\nError: ${acrCreate.stderr || acrCreate.error}`
          }]
        };
      }
    
      output += `\nRegistry created successfully!\n\nName: ${name}\nResource Group: ${resource_group}`;
    
      return { content: [{ type: "text", text: output }] };
    }
  • src/tools.js:576-597 (registration)
    The tool is registered by being included in the exported 'tools' object, which likely gets used by the MCP server to expose the tools.
    export const tools = {
      // Git
      gitStatusExplained,
      gitBranchExplained,
      gitCommitGuided,
      // Docker
      dockerCheckSetup,
      dockerAnalyzeProject,
      dockerBuild,
      // GitHub
      githubSecretsList,
      githubSecretsSet,
      // Azure
      azureCheckCli,
      azureAcrSetup,
      azureContainerAppsDeploy,
      // SonarCloud
      sonarcloudSetupGuide,
      sonarcloudCreateConfig,
      // Onboarding
      devOnboardingCheck,
    };

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/rideRTD/RTD-DevOps'

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