azure_acr_setup
Create and configure Azure Container Registry for Docker container deployments in DevOps workflows.
Instructions
Create and configure Azure Container Registry
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "azure_acr_setup"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools.js:365-411 (handler)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, };