azure_check_cli
Verify Azure CLI installation and authentication status to ensure proper configuration for Azure DevOps workflows and container deployments.
Instructions
Check Azure CLI installation and authentication
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_check_cli"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools.js:344-363 (handler)The handler function that implements the azure_check_cli tool. It performs checks for Azure CLI installation and login status using the commandRunner utility.
export async function azureCheckCli() { const checks = []; const azVersion = await commandRunner("az --version | head -1"); if (azVersion.success) { checks.push(`[OK] Azure CLI: ${azVersion.stdout}`); } else { checks.push(`[FAIL] Azure CLI not installed\n Install from: https://docs.microsoft.com/cli/azure/install-azure-cli`); return { content: [{ type: "text", text: checks.join("\n\n") }] }; } const account = await commandRunner("az account show --query '{name:name, id:id}' -o tsv"); if (account.success) { checks.push(`[OK] Logged in to Azure\n Account: ${account.stdout.split("\t")[0]}`); } else { checks.push(`[FAIL] Not logged in to Azure\n Run: az login`); } return { content: [{ type: "text", text: checks.join("\n\n") }] }; } - src/tools.js:576-597 (registration)The tools object exports all available tools, including azureCheckCli, which registers it for the MCP server.
export const tools = { // Git gitStatusExplained, gitBranchExplained, gitCommitGuided, // Docker dockerCheckSetup, dockerAnalyzeProject, dockerBuild, // GitHub githubSecretsList, githubSecretsSet, // Azure azureCheckCli, azureAcrSetup, azureContainerAppsDeploy, // SonarCloud sonarcloudSetupGuide, sonarcloudCreateConfig, // Onboarding devOnboardingCheck, };