[WAF tool] Add wellarchitectedframework_usageguide_get#2051
Open
sriramkakara wants to merge 5 commits intomainfrom
Open
[WAF tool] Add wellarchitectedframework_usageguide_get#2051sriramkakara wants to merge 5 commits intomainfrom
sriramkakara wants to merge 5 commits intomainfrom
Conversation
Member
Author
|
/azp run mcp - pullrequest - live |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Azure Well-Architected Framework (WAF) “usage guide” tool command that returns an embedded markdown guide describing how AI agents should apply WAF systematically.
Changes:
- Introduces
wellarchitectedframework usageguide getcommand and wires it into the WAF tool area registration/DI. - Adds an embedded markdown usage guide resource and a service to load/cache it.
- Adds unit tests plus updates to Azure MCP Server command docs and e2e test prompts.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/Azure.Mcp.Tools.WellArchitectedFramework/src/Commands/UsageGuide/UsageGuideGetCommand.cs | New command implementation that returns the usage guide text. |
| tools/Azure.Mcp.Tools.WellArchitectedFramework/src/Options/UsageGuide/UsageGuideGetOptions.cs | Options type for the new no-parameter command. |
| tools/Azure.Mcp.Tools.WellArchitectedFramework/src/Services/UsageGuide/IUsageGuideService.cs | Service contract for retrieving the usage guide content. |
| tools/Azure.Mcp.Tools.WellArchitectedFramework/src/Services/UsageGuide/UsageGuideService.cs | Embedded-resource loader with static caching for guide content. |
| tools/Azure.Mcp.Tools.WellArchitectedFramework/src/Resources/UsageGuide/usage-guide.md | New embedded markdown usage guide content. |
| tools/Azure.Mcp.Tools.WellArchitectedFramework/src/WellArchitectedFrameworkSetup.cs | Registers the new service/command and adds the usageguide subgroup. |
| tools/Azure.Mcp.Tools.WellArchitectedFramework/src/Azure.Mcp.Tools.WellArchitectedFramework.csproj | Embeds *.md resources so the guide ships in the assembly. |
| tools/Azure.Mcp.Tools.WellArchitectedFramework/tests/.../Commands/UsageGuide/UsageGuideGetCommandTests.cs | Unit tests for the new command behavior and error handling. |
| tools/Azure.Mcp.Tools.WellArchitectedFramework/tests/.../Services/UsageGuide/UsageGuideServiceTests.cs | Unit tests for loading/caching/thread-safety of the guide service. |
| tools/Azure.Mcp.Tools.WellArchitectedFramework/src/Resources/ServiceGuides/service-guides-generation-prompt.md | Minor prompt/comment formatting cleanup. |
| servers/Azure.Mcp.Server/docs/e2eTestPrompts.md | Adds prompts for end-to-end validation of the new tool. |
| servers/Azure.Mcp.Server/docs/azmcp-commands.md | Documents the new CLI command entry for usageguide get. |
tools/Azure.Mcp.Tools.WellArchitectedFramework/src/Commands/UsageGuide/UsageGuideGetCommand.cs
Outdated
Show resolved
Hide resolved
...cp.Tools.WellArchitectedFramework.UnitTests/Commands/UsageGuide/UsageGuideGetCommandTests.cs
Show resolved
Hide resolved
added 2 commits
March 15, 2026 16:50
tools/Azure.Mcp.Tools.WellArchitectedFramework/src/Options/UsageGuide/UsageGuideGetOptions.cs
Outdated
Show resolved
Hide resolved
...cp.Tools.WellArchitectedFramework.UnitTests/Commands/UsageGuide/UsageGuideGetCommandTests.cs
Outdated
Show resolved
Hide resolved
...cp.Tools.WellArchitectedFramework.UnitTests/Commands/UsageGuide/UsageGuideGetCommandTests.cs
Outdated
Show resolved
Hide resolved
tools/Azure.Mcp.Tools.WellArchitectedFramework/src/Commands/UsageGuide/UsageGuideGetCommand.cs
Show resolved
Hide resolved
Member
|
@sriramkakara There are few steps remaining from the above checklist:
|
Member
Author
|
srnagar
reviewed
Mar 18, 2026
Comment on lines
+27
to
+30
| "Get the Azure Well-Architected Framework usage guide for AI agents. " + | ||
| "This guide provides systematic instructions on how to apply the framework when architecting new Azure workloads, " + | ||
| "covering the five pillars (reliability, security, cost optimization, operational excellence, and performance efficiency) " + | ||
| "and their application through design principles, design strategies, and configuration recommendations."; |
srnagar
reviewed
Mar 18, 2026
| // at the same time when the cache is not yet initialized. | ||
| // Thread A: null check → acquire lock → null check again → initialize → release lock | ||
| // Thread B: null check → wait for lock (while Thread A is working) → acquire lock → null check again → see it's initialized by Thread A → return | ||
| private static void EnsureUsageGuideLoaded() |
Member
There was a problem hiding this comment.
Consider using Lazy<string> to load the resource
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?
Add a new
wellarchitectedframework_usageguide_getcommand to WAF tool.This command returns a usage guide on how to apply WAF.
GitHub issue number?
Issue 1927
Pre-merge Checklist
servers/Azure.Mcp.Server/CHANGELOG.mdand/orservers/Fabric.Mcp.Server/CHANGELOG.mdfor product changes (features, bug fixes, UI/UX, updated dependencies)servers/Azure.Mcp.Server/README.mdand/orservers/Fabric.Mcp.Server/README.mddocumentationeng/scripts/Process-PackageReadMe.ps1. See Package README/servers/Azure.Mcp.Server/docs/azmcp-commands.mdand/or/docs/fabric-commands.md.\eng\scripts\Update-AzCommandsMetadata.ps1to update tool metadata in azmcp-commands.md (required for CI)ToolDescriptionEvaluatorand obtained a score of0.4or more and a top 3 ranking for all related test promptsconsolidated-tools.jsonbreaking-changelabel/servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline