microsoft / microsoft/GitHub-Copilot-for-Azure

Enhancement: Replace hardcoded App Service templates with MCP tool (apply #1949 pattern)

Open
#2,148 1 comment 0 reactions 2 assignees View on GitHub

@apwestgarth is already working on this.

Since May 3, 2026.

untriaged
Dominant language
Python
Stars
250
Forks
204
Avg merge
1d 12h
Merged PRs (30d)
67

Description

Context

@manvkaur's PR #1949 replaced ~9,000 lines of hardcoded Azure Functions templates with dynamic MCP tool calls (functions_template_get), with a 3-tier fallback (CDN manifest → GitHub source → known-good Azure-Samples repos). This dramatically reduced context size and maintenance burden.

App Service should adopt the same pattern.

Scope

The App Service templates introduced in #1609 / PR #1635 currently hard-code:

  • 21 files under plugin/skills/azure-prepare/references/services/app-service/templates/
  • ~1,995 lines of code (split across web-app.md, web-api.md, selection.md, composition.md, and recipe source/{python,nodejs,dotnet}.md files for auth/cosmos/redis/sql)

These could be replaced with an analogous app_service_template_get (or similar) MCP tool that fetches templates dynamically from Azure-Samples repos.

Proposed approach

  1. Source of truth — identify or create AZD templates in Azure-Samples for each base template (web-app, web-api) × language (Python/Node.js/.NET) × recipe (auth/cosmos/redis/sql)
  2. MCP tool — extend the Azure MCP server with app_service_template_get mirroring functions_template_get semantics (language, template, infrastructure, with functionFiles[]/projectFiles[] output arrays)
  3. Fallback chain — same 3-tier pattern: CDN manifest → GitHub source → known-good repos
  4. Skill refactor — delete the hardcoded source/{lang}.md files; keep the orchestration files (composition.md, selection.md) with MCP tool guidance like Functions does
  5. Eval coverage — add cross-language eval summaries proving templates work end-to-end

Why this isn't blocking PR #1635

PR #1635 ships proven, manually-curated templates that work today. The MCP tool approach requires:

  • New MCP server endpoint
  • New AZD templates published to Azure-Samples
  • Awesome-AZD submissions for discoverability

These prerequisites take time. We don't want to delay shipping App Service Develop equity for an optimization that depends on cross-team work. Ship #1635 first, then layer this enhancement on top.

Reference

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.