Repository navigation
Add Azure Resiliency Agent tools - #3845
Open
Saswata Pandit (psaswata) wants to merge 21 commits into
Open
Saswata Pandit (psaswata) wants to merge 21 commits into
Saswata Pandit (psaswata) wants to merge 21 commits into
Conversation
Exposes the Azure Resiliency Agent through a single conversation-level tool, resiliencyagent_conversation_ask. A developer describes an application in their own words and receives a zonal resilience assessment, or asks for zone-resilient Bicep, ARM or Terraform templates for new resources. The area holds no agent logic. It is a thin client over the agent's existing A2A surface, so the backend keeps ownership of what a turn does, including which scenario handles it and when to stop and ask the user something. That is why one conversation-level tool covers both assessment and template generation rather than one tool per Azure operation. The agent is multi-turn: it asks its own clarifying questions before it can act. A single tool call therefore carries an entire conversation. The command polls the agent, raises an elicitation when the agent needs input, feeds the answer back, and returns once. The host model issues one call and never sees the polling, so clarifying questions reach the user exactly as the agent wrote them rather than depending on a model to follow instructions about how to poll. While a turn is running the agent publishes short reasoning steps. Those are forwarded as progress notifications, which also resets client inactivity timers on a call that can run for minutes. Templates and reports are written to the caller's working directory and returned as paths, following the pattern the Azure Migrate platform landing zone tool uses. A generated template is more useful as a file that can be opened and deployed than as text in a chat reply, and a long report does not have to travel through the model's context. Artifact names arrive from a remote service and are treated as untrusted input when used as file names. The tool is marked LocalRequired because it asks the user questions over the client connection, which is not available in HTTP mode. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 974958dc-ded9-4351-bed3-07227e1bce92
…ncy-agent-tool # Conflicts: # servers/Azure.Mcp.Server/README.md
Add five architecture and IaC scenario tools, local file attachment with explicit consent and bounded in-memory caching, A2A FilePart forwarding, public data-boundary routing, MCP artifact content blocks, evaluations, documentation, and tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 974958dc-ded9-4351-bed3-07227e1bce92
Remove stale POC prompts and use customer-facing service-area language. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 974958dc-ded9-4351-bed3-07227e1bce92
Remove the checked-in Vally specification and rely on the repository evaluator to generate unattended routing evaluations from the E2E prompt inventory. Normalize interactive scenarios to the supported context-required classification. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 974958dc-ded9-4351-bed3-07227e1bce92
Add generated Vally coverage for inline ARM, Bicep, and Terraform reviews. Clarify that review commands accept source directly in the request while local files use attachment IDs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 974958dc-ded9-4351-bed3-07227e1bce92
Guide complete and multi-file templates through the attachment flow while retaining direct support for templates pasted inline. Reserve existing IaC resiliency review for the format-specific Resiliency Agent commands instead of generic guidance tools. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 974958dc-ded9-4351-bed3-07227e1bce92
Include the nested FileContent kind discriminator required by the A2A polymorphic contract so uploaded bytes, filename, and MIME type survive backend deserialization and blob offload. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 974958dc-ded9-4351-bed3-07227e1bce92
Add a conceptual guidance command and routing prompts, and make the public A2A endpoint plus delegated scope fixed production constants with no runtime environment overrides or auth bypass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 974958dc-ded9-4351-bed3-07227e1bce92
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 974958dc-ded9-4351-bed3-07227e1bce92
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Native artifacts are lost in single-tool mode, existing files can be overwritten, and several required security, metadata, and integration gaps remain.
Review effort: Balanced
Findings: 3
Open (13)
Mark artifact-writing tools as non-read-only · New Return errors for failed, canceled, and rejected completions · New Prevent artifact writes from overwriting existing files · New Propagate native artifacts in single-tool loader · New Mark file attachment caching as non-read-only · New Add extensions for ARM and Terraform artifacts · New Support advertised tfvars and bicepparam extensions · New Implement or correct documented UNC path support · New Test elicitation consent before file snapshotting · New Add ToolDescriptionEvaluator evidence for new tools · New Move each model type into its own file · New Flatten options and use an attachment interface · New Add live tests for Azure and A2A integrations · New
What changed in this PR
Adds an Azure Resiliency Agent toolset that delegates guidance, assessment, generation, and IaC review to the hosted A2A service.
Changes:
- Adds seven commands with delegated authentication, polling, elicitation, attachments, and artifacts.
- Adds native MCP content support to command responses and loaders.
- Registers and documents the toolset with unit-test coverage.
| File | Description |
|---|---|
.github/CODEOWNERS |
Adds toolset owners. |
Microsoft.Mcp.slnx |
Adds projects to the root solution. |
core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/CommandFactoryToolLoader.cs |
Appends native MCP content. |
core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs |
Appends native MCP content. |
core/Microsoft.Mcp.Core/src/Models/Command/CommandResponse.cs |
Adds the native content contract. |
servers/Azure.Mcp.Server/Azure.Mcp.Server.slnx |
Adds toolset projects. |
servers/Azure.Mcp.Server/README.md |
Documents the service area. |
servers/Azure.Mcp.Server/changelog-entries/saspandit-resiliency-agent-tool.yaml |
Adds the feature changelog entry. |
servers/Azure.Mcp.Server/docs/azmcp-commands.md |
Documents all commands. |
servers/Azure.Mcp.Server/docs/e2eTestPrompts.md |
Adds routing prompts. |
servers/Azure.Mcp.Server/src/Program.cs |
Registers the toolset. |
servers/Azure.Mcp.Server/src/Resources/consolidated-tools.json |
Adds consolidated tool mappings. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/AssemblyInfo.cs |
Exposes internals to tests. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/Azure.Mcp.Tools.ResiliencyAgent.csproj |
Defines the tool project. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/Commands/Architecture/ArchitectureAssessCommand.cs |
Adds architecture assessment. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/Commands/Arm/ArmReviewCommand.cs |
Adds ARM review. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/Commands/Bicep/BicepReviewCommand.cs |
Adds Bicep review. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/Commands/File/FileAttachCommand.cs |
Adds consent-based attachment preparation. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/Commands/Guidance/GuidanceGetCommand.cs |
Adds resiliency guidance. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/Commands/Iac/IacGenerateCommand.cs |
Adds IaC generation. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/Commands/ResiliencyAgentCommand.cs |
Implements shared scenario execution. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/Commands/ResiliencyAgentJsonContext.cs |
Registers serializable models. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/Commands/Terraform/TerraformReviewCommand.cs |
Adds Terraform review. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/Models/ResiliencyAgentModels.cs |
Defines agent and artifact models. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/Options/FileAttachOptions.cs |
Defines file attachment input. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/Options/ResiliencyAgentOptionDescriptions.cs |
Defines shared option descriptions. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/Options/ResiliencyAgentRequestOptions.cs |
Defines scenario inputs. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/ResiliencyAgentSetup.cs |
Registers services and commands. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/Services/ArtifactWriter.cs |
Materializes generated artifacts. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/Services/AttachmentCache.cs |
Caches approved snapshots. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/Services/AttachmentPolicy.cs |
Defines attachment limits and types. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/Services/DataBoundaryResolver.cs |
Resolves tenant data boundaries. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/Services/IArtifactWriter.cs |
Defines artifact writing. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/Services/IAttachmentCache.cs |
Defines attachment caching. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/Services/IDataBoundaryResolver.cs |
Defines boundary resolution. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/Services/ILocalFileSnapshotter.cs |
Defines file snapshotting. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/Services/IResiliencyAgentService.cs |
Defines the A2A client contract. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/Services/LocalFileSnapshotter.cs |
Validates and snapshots files. |
tools/Azure.Mcp.Tools.ResiliencyAgent/src/Services/ResiliencyAgentService.cs |
Implements A2A communication. |
tools/Azure.Mcp.Tools.ResiliencyAgent/tests/Azure.Mcp.Tools.ResiliencyAgent.Tests/AttachmentServicesTests.cs |
Tests snapshots and caching. |
tools/Azure.Mcp.Tools.ResiliencyAgent/tests/Azure.Mcp.Tools.ResiliencyAgent.Tests/Guidance/GuidanceGetCommandTests.cs |
Tests guidance execution. |
tools/Azure.Mcp.Tools.ResiliencyAgent/tests/Azure.Mcp.Tools.ResiliencyAgent.Tests/Iac/IacGenerateCommandTests.cs |
Tests generation and native artifacts. |
tools/Azure.Mcp.Tools.ResiliencyAgent/tests/Azure.Mcp.Tools.ResiliencyAgent.Tests/ResiliencyAgentSetupTests.cs |
Tests registration. |
tools/Azure.Mcp.Tools.ResiliencyAgent/tests/Azure.Mcp.Tools.ResiliencyAgent.Tests/ScenarioCommandExecutionTests.cs |
Tests shared scenario behavior. |
tools/Azure.Mcp.Tools.ResiliencyAgent/tests/Azure.Mcp.Tools.ResiliencyAgent.Tests/Services/ArtifactWriterTests.cs |
Tests artifact writing. |
tools/Azure.Mcp.Tools.ResiliencyAgent/tests/Azure.Mcp.Tools.ResiliencyAgent.Tests/Services/DataBoundaryResolverTests.cs |
Tests boundary mapping and retries. |
tools/Azure.Mcp.Tools.ResiliencyAgent/tests/Azure.Mcp.Tools.ResiliencyAgent.Tests/Services/ResiliencyAgentServiceTests.cs |
Tests A2A payloads and artifacts. |
tools/Azure.Mcp.Tools.ResiliencyAgent/tests/Azure.Mcp.Tools.ResiliencyAgent.Tests/Azure.Mcp.Tools.ResiliencyAgent.Tests.csproj |
Defines the unit-test project. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 974958dc-ded9-4351-bed3-07227e1bce92
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 974958dc-ded9-4351-bed3-07227e1bce92
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 974958dc-ded9-4351-bed3-07227e1bce92
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 974958dc-ded9-4351-bed3-07227e1bce92
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 974958dc-ded9-4351-bed3-07227e1bce92
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 974958dc-ded9-4351-bed3-07227e1bce92
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 974958dc-ded9-4351-bed3-07227e1bce92
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 974958dc-ded9-4351-bed3-07227e1bce92
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 974958dc-ded9-4351-bed3-07227e1bce92
Resolve the cspell dictionary conflict and update affected tests for the latest command registration and loader APIs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 974958dc-ded9-4351-bed3-07227e1bce92
Keep the upstream explicit server command registration while resolving the PR conflict. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 974958dc-ded9-4351-bed3-07227e1bce92
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What does this PR do?
Adds the Azure Resiliency Agent namespace with seven tools for general
guidance, architecture assessment, IaC generation, Bicep/ARM/Terraform review
and consent-based local file attachment.
The tools delegate resiliency decisions to the existing Azure Resiliency Agent
through its asynchronous A2A API. The implementation includes delegated
authentication, Azure data-boundary propagation, polling, clarification turns,
bounded attachment handling and native MCP file artifacts.
This PR also:
McpContentpath to every tool-loading mode so commands canreturn native content using official MCP tool-result content
blocks
and MCP resources;
includes explicit artifact-presentation guidance, and emits one
content-carrying embedded resource per file without duplicate local-path
resource links;
files under
azure-resiliency/, reusing identical content and avoidingoverwrites through collision-safe naming;
links using canonical absolute
file:///URIs while excluding session,tool-call, cache and temporary paths;
The file-upload design was reviewed with the Azure MCP security team, including
the
LocalRequireddesignation, file validation and sanitization checks, andUNC/network-path rejection.
Tool surface
resiliencyagent_guidance_getresiliencyagent_file_attachresiliencyagent_architecture_assessresiliencyagent_iac_generateresiliencyagent_bicep_reviewresiliencyagent_arm_reviewresiliencyagent_terraform_reviewTesting
Build-Local.ps1passed.Build-Local.ps1 -VerifyNpxpassed.architecture assessment, IaC generation and Bicep, ARM JSON and Terraform
review.
attachment, clarification, native artifact rendering, repository edits and
user-approved PR orchestration.
Blob persistence and pointer-only task storage.
Product evidence
GitHub issue number?
Closes #3844
Pre-merge Checklist
one cohesive namespace contribution
consolidated-tools.jsonazmcp-commands.mde2eTestPrompts.md