Conversation
Implements issue #200 - adds a new ContainerApps toolset using Azure.ResourceManager.AppContainers to list container apps in a subscription. Includes: - ContainerAppListCommand with resource group filtering - ContainerAppsService using BaseAzureResourceService with Resource Graph - Unit tests (8 passing) - Documentation updates (azmcp-commands.md, e2eTestPrompts.md) - Changelog entry Co-authored-by: ArthurMa1978 <20514459+ArthurMa1978@users.noreply.github.com>
Co-authored-by: ArthurMa1978 <20514459+ArthurMa1978@users.noreply.github.com>
azmcp containerapps containerapp list command
…list Removes the intermediate 'containerapp' subgroup so the command path is `azmcp containerapps list` instead of `azmcp containerapps containerapp list`. Updates Setup.cs, azmcp-commands.md, e2eTestPrompts.md, and changelog entry. Co-authored-by: ArthurMa1978 <20514459+ArthurMa1978@users.noreply.github.com>
azmcp containerapps containerapp list commandazmcp containerapps list command
…to consolidated-tools.json Co-authored-by: ArthurMa1978 <20514459+ArthurMa1978@users.noreply.github.com>
…json The containerapps_list tool was not mapped in consolidated-tools.json, causing ConsolidatedModeTests to fail in DEBUG builds. Added the tool to the get_azure_container_details consolidated tool alongside other container service tools (ACR, AKS). Also restores global.json SDK version to 10.0.103 (was accidentally committed as 10.0.102 in the previous commit). Co-authored-by: ArthurMa1978 <20514459+ArthurMa1978@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a new Azure Container Apps tool area and exposes a azmcp containerapps list command, aligning command/tool naming and wiring it into the server’s consolidated tool mappings and documentation.
Changes:
- Introduces
Azure.Mcp.Tools.ContainerAppsarea withcontainerapps listcommand, service layer, options, models, and JSON source-gen context. - Registers the new area in the server and updates consolidated tool mapping to include
containerapps_listunderget_azure_container_details. - Adds unit tests and updates server docs (command reference + e2e prompts) and changelog entry.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/Azure.Mcp.Tools.ContainerApps/src/ContainerAppsSetup.cs | Registers the Container Apps area and command into the command hierarchy. |
| tools/Azure.Mcp.Tools.ContainerApps/src/Commands/ContainerApp/ContainerAppListCommand.cs | Implements the list command execution and response shaping. |
| tools/Azure.Mcp.Tools.ContainerApps/src/Services/ContainerAppsService.cs | Implements Resource Graph-backed listing of Container Apps. |
| tools/Azure.Mcp.Tools.ContainerApps/src/Services/IContainerAppsService.cs | Defines the Container Apps service contract used by the command. |
| tools/Azure.Mcp.Tools.ContainerApps/src/Commands/BaseContainerAppsCommand.cs | Adds shared subscription/resource-group option behavior for Container Apps commands. |
| tools/Azure.Mcp.Tools.ContainerApps/src/Commands/ContainerAppsJsonContext.cs | Adds AOT-friendly System.Text.Json source generation metadata for responses. |
| tools/Azure.Mcp.Tools.ContainerApps/src/Models/ContainerAppInfo.cs | Defines the output model for listed container apps. |
| tools/Azure.Mcp.Tools.ContainerApps/src/Options/ContainerApp/ContainerAppListOptions.cs | Defines options type for the list command. |
| tools/Azure.Mcp.Tools.ContainerApps/src/GlobalUsings.cs | Adds global usings needed across the tool project. |
| tools/Azure.Mcp.Tools.ContainerApps/src/Azure.Mcp.Tools.ContainerApps.csproj | Adds the new tool project configuration and dependencies. |
| tools/Azure.Mcp.Tools.ContainerApps/src/AssemblyInfo.cs | Enables InternalsVisibleTo for unit/live tests. |
| tools/Azure.Mcp.Tools.ContainerApps/tests/Azure.Mcp.Tools.ContainerApps.UnitTests/Azure.Mcp.Tools.ContainerApps.UnitTests.csproj | Adds a new unit test project for the Container Apps tool. |
| tools/Azure.Mcp.Tools.ContainerApps/tests/Azure.Mcp.Tools.ContainerApps.UnitTests/ContainerApp/ContainerAppListCommandTests.cs | Adds unit tests for validation, filtering, error handling, and serialization. |
| servers/Azure.Mcp.Server/src/Program.cs | Registers the new Container Apps area in server startup. |
| servers/Azure.Mcp.Server/src/Resources/consolidated-tools.json | Adds containerapps_list under get_azure_container_details and updates description. |
| servers/Azure.Mcp.Server/docs/azmcp-commands.md | Documents azmcp containerapps list usage and examples. |
| servers/Azure.Mcp.Server/docs/e2eTestPrompts.md | Updates e2e prompts to reference containerapps_list. |
| servers/Azure.Mcp.Server/changelog-entries/1773129554713.yaml | Adds changelog entry for the new command. |
tools/Azure.Mcp.Tools.ContainerApps/src/Commands/ContainerApp/ContainerAppListCommand.cs
Outdated
Show resolved
Hide resolved
tools/Azure.Mcp.Tools.ContainerApps/src/Services/ContainerAppsService.cs
Outdated
Show resolved
Hide resolved
...s/tests/Azure.Mcp.Tools.ContainerApps.UnitTests/ContainerApp/ContainerAppListCommandTests.cs
Outdated
Show resolved
Hide resolved
…Service.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ContainerAppListCommand.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…d add ClearEnvironmentVariablesBeforeTest assembly attribute Co-authored-by: ArthurMa1978 <20514459+ArthurMa1978@users.noreply.github.com>
| @@ -0,0 +1,3 @@ | |||
| changes: | |||
There was a problem hiding this comment.
@vcolin7 if the PR number is not added does it automagically get resolved later?
| namespace Azure.Mcp.Tools.ContainerApps.Models; | ||
|
|
||
| public sealed record ContainerAppInfo( | ||
| [property: JsonPropertyName("name")] string Name, |
There was a problem hiding this comment.
These annotations aren't required if they also match the property name.
live1206
left a comment
There was a problem hiding this comment.
Overall this is a well-structured PR that follows the repo's existing patterns (ACR, AKS). A few items to address:
| : BaseAzureResourceService(subscriptionService, tenantService), IContainerAppsService | ||
| { | ||
| public async Task<ResourceQueryResults<ContainerAppInfo>> ListContainerApps( | ||
| string subscription, |
There was a problem hiding this comment.
Bug: The tenant parameter is accepted here but never passed to ExecuteResourceQueryAsync() below. The command layer does pass options.Tenant to this method (ContainerAppListCommand.cs line ~33), so tenant selection is silently ignored. Should tenant be forwarded to the resource query call?
| </ItemGroup> | ||
| <ItemGroup> | ||
| <PackageReference Include="Azure.ResourceManager" /> | ||
| <PackageReference Include="Azure.ResourceManager.AppContainers" /> |
There was a problem hiding this comment.
Nit: Azure.ResourceManager.AppContainers is referenced but no types from this package appear to be used — the service implementation uses ExecuteResourceQueryAsync (Resource Graph) with manual JsonElement parsing. Consider removing this dependency to reduce package weight and improve AOT trimming.
| new Azure.Mcp.Tools.CloudArchitect.CloudArchitectSetup(), | ||
| new Azure.Mcp.Tools.Communication.CommunicationSetup(), | ||
| new Azure.Mcp.Tools.Compute.ComputeSetup(), | ||
| new Azure.Mcp.Tools.ContainerApps.ContainerAppsSetup(), |
There was a problem hiding this comment.
Nit: Alphabetical ordering — ConfidentialLedger ("Conf...") sorts before ContainerApps ("Cont..."), so this line should come after the ConfidentialLedgerSetup registration.
| @@ -0,0 +1,2 @@ | |||
| [assembly: Microsoft.Mcp.Tests.Helpers.ClearEnvironmentVariablesBeforeTest] | |||
There was a problem hiding this comment.
Nit: Missing the copyright header (// Copyright (c) Microsoft Corporation. / // Licensed under the MIT License.) that all other source files in this PR include (e.g., the src AssemblyInfo.cs).
…emove redundant JsonPropertyName annotations, remove unused tenant parameter, add copyright header, add PR number to changelog Co-authored-by: ArthurMa1978 <20514459+ArthurMa1978@users.noreply.github.com>
Azure.ResourceManager.AppContainerspackage reference from csproj[JsonPropertyName]annotations from ContainerAppInfo.cs (camelCase policy handles it)tenantparameter from IContainerAppsService and ContainerAppsService (not forwarded to ExecuteResourceQueryAsync)pr: 1981to changelog entry YAMLInvoking Livetests
Copilot submitted PRs are not trustworthy by default. Users with
writeaccess to the repo need to validate the contents of this PR before leaving a comment with the text/azp run mcp - pullrequest - live. This will trigger the necessary livetest workflows to complete required validation.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.