Skip to main content
Glama

azure_create_workflow

Generate GitHub Actions workflows to automate Azure deployments, streamlining CI/CD pipelines for containerized applications.

Instructions

Generate GitHub Actions workflow for Azure deployment

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that generates a GitHub Actions YAML workflow for building, pushing to ACR, and deploying to Azure Container Apps. Includes optional SonarCloud integration.
      async ({ app_name, resource_group, acr_name, include_sonar, sonar_org }) => {
        let sonarStep = "";
        if (include_sonar) {
          sonarStep = `
          - name: SonarCloud Scan
            uses: SonarSource/sonarcloud-github-action@master
            env:
              GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}
              SONAR_TOKEN: \${{ secrets.SONAR_TOKEN }}
            with:
              args: >
                -Dsonar.organization=${sonar_org}
                -Dsonar.projectKey=\${{ github.repository_owner }}_\${{ github.event.repository.name }}
    `;
        }
    
        const workflow = `name: Build and Deploy to Azure
    
    on:
      push:
        branches: [ main, master ]
      pull_request:
        branches: [ main, master ]
    
    env:
      ACR_NAME: ${acr_name}
      ACR_LOGIN_SERVER: ${acr_name}.azurecr.io
      APP_NAME: ${app_name}
      RESOURCE_GROUP: ${resource_group}
    
    jobs:
      build-and-test:
        runs-on: ubuntu-latest
        steps:
          - name: Checkout code
            uses: actions/checkout@v4
            with:
              fetch-depth: 0
    
          - name: Set up Docker Buildx
            uses: docker/setup-buildx-action@v3
    ${sonarStep}
      build-and-push:
        needs: build-and-test
        runs-on: ubuntu-latest
        if: github.event_name != 'pull_request'
    
        steps:
          - name: Checkout code
            uses: actions/checkout@v4
    
          - name: Login to Azure
            uses: azure/login@v2
            with:
              creds: \${{ secrets.AZURE_CREDENTIALS }}
    
          - name: Login to ACR
            run: az acr login -n \${{ env.ACR_NAME }}
    
          - name: Build and push image
            uses: docker/build-push-action@v5
            with:
              context: .
              push: true
              tags: |
                \${{ env.ACR_LOGIN_SERVER }}/\${{ env.APP_NAME }}:latest
                \${{ env.ACR_LOGIN_SERVER }}/\${{ env.APP_NAME }}:\${{ github.sha }}
              cache-from: type=gha
              cache-to: type=gha,mode=max
    
      deploy:
        needs: build-and-push
        runs-on: ubuntu-latest
        if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
    
        steps:
          - name: Login to Azure
            uses: azure/login@v2
            with:
              creds: \${{ secrets.AZURE_CREDENTIALS }}
    
          - name: Deploy to Container Apps
            run: |
              az containerapp update \\
                -n \${{ env.APP_NAME }} \\
                -g \${{ env.RESOURCE_GROUP }} \\
                --image \${{ env.ACR_LOGIN_SERVER }}/\${{ env.APP_NAME }}:\${{ github.sha }}
    
          - name: Get App URL
            run: |
              URL=$(az containerapp show -n \${{ env.APP_NAME }} -g \${{ env.RESOURCE_GROUP }} --query properties.configuration.ingress.fqdn -o tsv)
              echo "## Deployed to: https://$URL" >> $GITHUB_STEP_SUMMARY`;
    
        return {
          content: [{
            type: "text",
            text: `AZURE DEPLOYMENT WORKFLOW
    =========================
    
    Save to: .github/workflows/azure-deploy.yml
    
    ${workflow}
    
    REQUIRED SECRETS:
    -----------------
    1. AZURE_CREDENTIALS - Azure service principal credentials
    
       Create service principal:
       az ad sp create-for-rbac --name "github-actions" \\
         --role contributor \\
         --scopes /subscriptions/{subscription-id}/resourceGroups/${resource_group} \\
         --json-auth
    
       Then:
       gh secret set AZURE_CREDENTIALS
       (paste the entire JSON output)
    
    ${include_sonar ? `2. SONAR_TOKEN - Get from sonarcloud.io/account/security
       gh secret set SONAR_TOKEN` : ""}
    
    FIRST-TIME SETUP:
    -----------------
    Before the workflow runs, you need:
    
    1. Resource group: ${resource_group}
       az group create -n ${resource_group} -l westus2
    
    2. Container registry: ${acr_name}
       az acr create -n ${acr_name} -g ${resource_group} --sku Basic
    
    3. Container app (first deployment):
       az containerapp create -n ${app_name} -g ${resource_group} \\
         --environment ${app_name}-env \\
         --image mcr.microsoft.com/azuredocs/containerapps-helloworld:latest \\
         --target-port 8080 --ingress external
    
    4. Grant ACR pull access:
       az role assignment create \\
         --assignee $(az ad sp list --display-name "github-actions" --query [0].appId -o tsv) \\
         --role AcrPush \\
         --scope $(az acr show -n ${acr_name} --query id -o tsv)`
          }]
        };
      }
  • Input schema defining parameters for the azure_create_workflow tool.
    {
      app_name: { type: "string", description: "Azure Container App name" },
      resource_group: { type: "string", description: "Azure resource group" },
      acr_name: { type: "string", description: "Azure Container Registry name" },
      include_sonar: { type: "boolean", description: "Include SonarCloud analysis", default: false },
      sonar_org: { type: "string", description: "SonarCloud organization", default: "" }
    },
  • src/index.js:1389-1542 (registration)
    Registration of the 'azure_create_workflow' tool using McpServer.tool() method, specifying name, description, schema, and handler.
      "azure_create_workflow",
      "Generate GitHub Actions workflow for Azure deployment",
      {
        app_name: { type: "string", description: "Azure Container App name" },
        resource_group: { type: "string", description: "Azure resource group" },
        acr_name: { type: "string", description: "Azure Container Registry name" },
        include_sonar: { type: "boolean", description: "Include SonarCloud analysis", default: false },
        sonar_org: { type: "string", description: "SonarCloud organization", default: "" }
      },
      async ({ app_name, resource_group, acr_name, include_sonar, sonar_org }) => {
        let sonarStep = "";
        if (include_sonar) {
          sonarStep = `
          - name: SonarCloud Scan
            uses: SonarSource/sonarcloud-github-action@master
            env:
              GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}
              SONAR_TOKEN: \${{ secrets.SONAR_TOKEN }}
            with:
              args: >
                -Dsonar.organization=${sonar_org}
                -Dsonar.projectKey=\${{ github.repository_owner }}_\${{ github.event.repository.name }}
    `;
        }
    
        const workflow = `name: Build and Deploy to Azure
    
    on:
      push:
        branches: [ main, master ]
      pull_request:
        branches: [ main, master ]
    
    env:
      ACR_NAME: ${acr_name}
      ACR_LOGIN_SERVER: ${acr_name}.azurecr.io
      APP_NAME: ${app_name}
      RESOURCE_GROUP: ${resource_group}
    
    jobs:
      build-and-test:
        runs-on: ubuntu-latest
        steps:
          - name: Checkout code
            uses: actions/checkout@v4
            with:
              fetch-depth: 0
    
          - name: Set up Docker Buildx
            uses: docker/setup-buildx-action@v3
    ${sonarStep}
      build-and-push:
        needs: build-and-test
        runs-on: ubuntu-latest
        if: github.event_name != 'pull_request'
    
        steps:
          - name: Checkout code
            uses: actions/checkout@v4
    
          - name: Login to Azure
            uses: azure/login@v2
            with:
              creds: \${{ secrets.AZURE_CREDENTIALS }}
    
          - name: Login to ACR
            run: az acr login -n \${{ env.ACR_NAME }}
    
          - name: Build and push image
            uses: docker/build-push-action@v5
            with:
              context: .
              push: true
              tags: |
                \${{ env.ACR_LOGIN_SERVER }}/\${{ env.APP_NAME }}:latest
                \${{ env.ACR_LOGIN_SERVER }}/\${{ env.APP_NAME }}:\${{ github.sha }}
              cache-from: type=gha
              cache-to: type=gha,mode=max
    
      deploy:
        needs: build-and-push
        runs-on: ubuntu-latest
        if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
    
        steps:
          - name: Login to Azure
            uses: azure/login@v2
            with:
              creds: \${{ secrets.AZURE_CREDENTIALS }}
    
          - name: Deploy to Container Apps
            run: |
              az containerapp update \\
                -n \${{ env.APP_NAME }} \\
                -g \${{ env.RESOURCE_GROUP }} \\
                --image \${{ env.ACR_LOGIN_SERVER }}/\${{ env.APP_NAME }}:\${{ github.sha }}
    
          - name: Get App URL
            run: |
              URL=$(az containerapp show -n \${{ env.APP_NAME }} -g \${{ env.RESOURCE_GROUP }} --query properties.configuration.ingress.fqdn -o tsv)
              echo "## Deployed to: https://$URL" >> $GITHUB_STEP_SUMMARY`;
    
        return {
          content: [{
            type: "text",
            text: `AZURE DEPLOYMENT WORKFLOW
    =========================
    
    Save to: .github/workflows/azure-deploy.yml
    
    ${workflow}
    
    REQUIRED SECRETS:
    -----------------
    1. AZURE_CREDENTIALS - Azure service principal credentials
    
       Create service principal:
       az ad sp create-for-rbac --name "github-actions" \\
         --role contributor \\
         --scopes /subscriptions/{subscription-id}/resourceGroups/${resource_group} \\
         --json-auth
    
       Then:
       gh secret set AZURE_CREDENTIALS
       (paste the entire JSON output)
    
    ${include_sonar ? `2. SONAR_TOKEN - Get from sonarcloud.io/account/security
       gh secret set SONAR_TOKEN` : ""}
    
    FIRST-TIME SETUP:
    -----------------
    Before the workflow runs, you need:
    
    1. Resource group: ${resource_group}
       az group create -n ${resource_group} -l westus2
    
    2. Container registry: ${acr_name}
       az acr create -n ${acr_name} -g ${resource_group} --sku Basic
    
    3. Container app (first deployment):
       az containerapp create -n ${app_name} -g ${resource_group} \\
         --environment ${app_name}-env \\
         --image mcr.microsoft.com/azuredocs/containerapps-helloworld:latest \\
         --target-port 8080 --ingress external
    
    4. Grant ACR pull access:
       az role assignment create \\
         --assignee $(az ad sp list --display-name "github-actions" --query [0].appId -o tsv) \\
         --role AcrPush \\
         --scope $(az acr show -n ${acr_name} --query id -o tsv)`
          }]
        };
      }
    );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool generates a workflow but does not specify what that entails—e.g., whether it creates a file, outputs code, requires authentication, or has side effects. For a tool with zero annotation coverage, this lack of detail on behavior and potential constraints 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.

Conciseness5/5

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

The description is a single, clear sentence: 'Generate GitHub Actions workflow for Azure deployment.' It is front-loaded with the core action and resource, with no unnecessary words or redundancy. Every part of the sentence earns its place by conveying essential information efficiently, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no parameters (simple complexity) and no output schema, the description is minimally adequate. It states what the tool does but lacks details on behavior, output format, or integration with siblings. For a tool that likely generates code or configurations, more context on the result (e.g., file creation, code output) would improve completeness, but it meets a basic threshold.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has no parameters (parameter count: 0), and schema description coverage is 100%, meaning there are no undocumented inputs. The description does not add parameter details, which is acceptable since no parameters exist. A baseline score of 4 is appropriate as the schema fully covers the absence of parameters, and the description does not need to compensate for any gaps.

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's purpose: 'Generate GitHub Actions workflow for Azure deployment.' It specifies the verb ('Generate'), resource ('GitHub Actions workflow'), and target ('Azure deployment'), which is specific and actionable. However, it does not explicitly differentiate from sibling tools like 'github_actions_create_ci' or 'sonarcloud_create_workflow,' which might have overlapping or related functionality, so it falls short of a perfect score.

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 alternatives. It lacks context on prerequisites, such as whether Azure setup is required, or when to choose this over other workflow creation tools like 'github_actions_create_ci.' Without any usage instructions or exclusions, the agent must infer context, which is insufficient for effective tool selection.

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

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