Skip to content

Enhancement: Replace hardcoded Container Apps templates with MCP tool (apply #1949 pattern) #2149

Description

@paulyuk

DRIs: @paulyuk (assignee), @simonjj (co-DRI — see comment, external contributor)


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.

Container Apps should adopt the same pattern.

Scope

The Container Apps templates introduced in #1610 / PR #1636 currently hard-code:

  • 15 files under plugin/skills/azure-prepare/references/services/container-apps/templates/
  • ~2,033 lines covering 6 base templates (web-app, api, microservice, worker, job, functions-on-aca) and 7 recipes (acr, cosmos, dapr, postgres, redis, servicebus, composition)

These could be replaced with an analogous container_apps_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 × recipe combination (Container Apps already has rich AZD templates: container-apps-azd-templates)
  2. MCP tool — extend the Azure MCP server with container_apps_template_get mirroring functions_template_get semantics
  3. Fallback chain — same 3-tier pattern: CDN manifest → GitHub source → known-good repos
  4. Skill refactor — delete hardcoded base template files; keep orchestration (composition.md, selection.md, recipes/README.md) with MCP tool guidance like Functions
  5. Recipe-specific work — Container Apps recipes (Dapr components, KEDA scalers) are more layered than Functions bindings. Keep recipe READMEs that document the additive overlays; let the MCP tool deliver the base + Dapr/KEDA wiring patterns
  6. Eval coverage — add cross-language eval summaries proving end-to-end deployment

Why this isn't blocking PR #1636

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

  • New MCP server endpoint
  • AZD template inventory mapped to base+recipe combinations
  • Cross-team coordination

We don't want to delay shipping Container Apps Develop equity for an optimization. Ship #1636 first, then layer this enhancement on top.

Reference

Metadata

Metadata

Assignees

Labels

No labels
No labels

Fields

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions