microsoft / azure-ai
Azure AI Services
This runbook guides an agent through working with A
The shape of the run
7 steps · start to finish.
- 1Step 1
Environment Setup
▶Verify the Azure environment and determine which invocation method to use (MCP vs. CLI).
echo "=== AZURE AI SERVICES SETUP ===" # Check if Azure MCP is available if command -v mcp >/dev/null 2>&1; then echo "MCP available — will prefer azure__search / azure__speech tools" USE_MCP=true else echo "MCP not available — will use Azure CLI fallback" USE_MCP=false fi # Verify az CLI is installed (needed as fallback or for management tasks) command -v az >/dev/null 2>&1 || { echo "WARNING: az CLI not found. Install via: curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash"; } # Verify login state az account show --query "{subscription:id, name:name}" -o json 2>/dev/null || { echo "Not logged in to Azure. Run: az login" exit 1 } # Create output directory mkdir -p /app/results echo "Setup complete."If the environment is not authenticated, abort and instruct the user to run
az loginor configure a service principal. - 2Step 2
Select Service and Verify Resource Exists
▶Based on the `azure_service` parameter, confirm the target resource exists and is accessible.
- 3Step 3
Invoke the Azure AI Service
▶Choose the appropriate invocation path based on the selected service and available tools.
- 4Step 4
Iterate on Errors (max 3 rounds)
▶If Step 3 fails or returns unexpected results:
- 5Step 5
Validate Output
▶Confirm the service returned meaningful results before writing the summary.
- 6Step 6
Write Commands Log
▶Document all MCP tool calls and CLI commands executed during this run.
- 7Step 7
Final Checklist (MANDATORY — do not skip)
▶echo "=== FINAL OUTPUT VERIFICATION ===" RESULTS_DIR="/app/results" for f in \ "$RESULTS_DIR/summary.md" \