microsoft/mcp/azurebackup-add-tool
Claude Code and agent skill by microsoft/mcp
- vendor
Checking that the SKILL.md file is still in the repository.
Add a new tool/command to the Azure Backup MCP toolset. Covers the full lifecycle: command implementation, option definitions, service layer, input validation, unit tests, live tests, recorded test playback, CI validation, spell check, changelog entry, tool description evaluation, and PR checklist. USE WHEN: add new backup command, create backup tool, implement backup operation, new azurebackup command, add MCP tool for backup, new vault operation, new policy command, new governance command.
Install
npx vskill@latest install microsoft/mcp/azurebackup-add-toolSKILL.md
The same SKILL.md was published earlier as microsoft/mcp/azurebackup-add-tool.
Add a New Tool to Azure Backup MCP
Purpose
Step-by-step workflow for adding a new command to the Azure Backup MCP toolset, ensuring it passes all validation gates before PR submission.
When to Use
- Adding a new
azmcp azurebackup <group> <operation>command - Extending an existing command group (vault, policy, protecteditem, etc.)
- Adding a new command group (security, compliance, etc.)
Prerequisites
.NET 10 SDKinstalled (seeglobal.json)- Azure authentication configured (
az login/Connect-AzAccount) - Repository cloned with
upstreamremote pointing tomicrosoft/mcp - Branch created from
upstream/main
Procedure
Phase 1: Implementation
Follow `/.github/skills/add-azure-mcp-tools/SKILL.md` as the authoritative guide. The Azure Backup toolset lives in tools/Azure.Mcp.Tools.AzureBackup/.
1a. Create Option Definitions
File: src/Options/{Group}/{Resource}{Operation}Options.cs
- Use
OptionDefinitions.Common.*for shared options (subscription, resourceGroup) - Use
AzureBackupOptionDefinitions.VaultandAzureBackupOptionDefinitions.VaultTypefor vault options - Add new options to
AzureBackupOptionDefinitionsif reusable across commands - Use
.AsRequired()/.AsOptional()extension methods
1b. Add Service Method
File: src/Services/IAzureBackupService.cs and src/Services/AzureBackupService.cs
- Add the interface method first
- Route to
rsvOpsordppOpsbased on vault type usingResolveVaultTypeAsync - For RSV-only operations, add to
IRsvBackupOperations/RsvBackupOperations - For DPP-only operations, add to
IDppBackupOperations/DppBackupOperations
1c. Implement the Command
File: src/Commands/{Group}/{Resource}{Operation}Command.cs
Required patterns:
- Use
[CommandMetadata(...)]attribute (not property overrides) - Sealed class with primary constructor
- Inject
ILogger<T>andIAzureBackupService - Override
RegisterOptions,BindOptions,ExecuteAsync - Add telemetry tags via
AzureBackupTelemetryTags.AddVaultTags(context.Activity, ...) - Call
HandleException(context, ex)in catch blocks
1d. Register the Command
File: src/AzureBackupSetup.cs
- Add
services.AddSingleton<MyNewCommand>()inConfigureServices - Add
group.AddCommand<MyNewCommand>(serviceProvider)inRegisterCommands - Create a new
CommandGroupif needed for a new group
1e. Register JSON Serialization Context
File: src/Commands/AzureBackupJsonContext.cs
- Add
[JsonSerializable(typeof(MyNewCommand.MyResultType))]for AOT safety
Phase 2: Input Validation
Before writing tests, validate all inputs are handled correctly:
Checklist:
- [ ] Required parameters throw
ArgumentExceptionwith clear message when missing - [ ] Subscription format validated (GUID only) via
ValidateSubscriptionFormat - [ ] Vault type normalized correctly (rsv/dpp case-insensitive)
- [ ] Enum/string parameters validated against allowed values with helpful error listing
- [ ] Null/empty strings handled with
ArgumentException.ThrowIfNullOrWhiteSpace - [ ] ARM resource IDs parsed safely with try-catch on
new ResourceIdentifier(...) - [ ] Error messages are actionable (tell user what to provide, not just what failed)
Phase 3: Unit Tests
File: tests/Azure.Mcp.Tools.AzureBackup.Tests/{Group}/{Resource}{Operation}CommandTests.cs
Required Test Methods
Run Unit Tests
Verify all tests pass before proceeding.
Phase 4: Live Tests
File: tests/Azure.Mcp.Tools.AzureBackup.Tests/AzureBackupCommandTests.cs
4a. Add Test Methods
Azure Backup live tests use [Fact] on a RecordedCommandTestsBase subclass with CallToolAsync. There is no [RecordedTest] attribute in this toolset.
- Use
[Fact]for all live tests (not[RecordedTest]— that attribute is not used in Azure Backup) - Use
[LiveTestOnly]alongside[Fact]for long-running E2E tests that cannot reliably replay - Use test resource values from
DeploymentOutputs(set intest-resources-post.ps1)
4b. Update Test Infrastructure (if needed)
If the new command requires new Azure resources:
- Edit
tests/test-resources.bicepto add the resource - Edit
tests/test-resources-post.ps1to output new deployment values - Deploy:
./eng/scripts/Deploy-TestResources.ps1 -Paths AzureBackup
4c. Record Live Tests
4d. Push Recordings
This updates the Tag field in assets.json. Commit the updated `assets.json`.
4e. Verify Playback
All recorded tests must pass in Playback mode.
Phase 5: CI Validation Gates
Run these checks in order. All must pass before creating a PR.
5a. Build
5b. Format Check
If it fails, fix with:
5c. Full Unit Tests
5d. Full Live Tests (Playback)
5e. Spell Check
If new Azure Backup-specific technical terms are flagged, add them to tools/Azure.Mcp.Tools.AzureBackup/cspell.yaml. Add cross-cutting terms used by multiple projects to .vscode/cspell.json.
5f. Full Build Verification
5g. AOT/Native Build Verification
Azure Backup is marked IsAotCompatible=true, so also validate native compilation:
If this fails for a new Azure SDK dependency, the toolset may need to be excluded from native builds (see docs/aot-compatibility.md).
Phase 6: Tool Description Evaluation
Run the ToolDescriptionEvaluator to verify the new tool's description is discoverable by AI agents.
Target: Top 3 ranking with confidence score >= 0.4.
If the score is low, improve the command's Description in the [CommandMetadata] attribute:
- Include key verbs users would say ("configure", "enable", "list", "show")
- Mention specific resource types ("vault", "policy", "protected item")
- Describe what the output looks like
- Re-run until the score meets the threshold
Phase 7: Documentation
7a. Update Command Reference
File: servers/Azure.Mcp.Server/docs/azmcp-commands.md
Add the new command in alphabetical order within the azurebackup section.
Then regenerate the commands metadata:
This is required for CI validation.
7b. Add Test Prompts
File: servers/Azure.Mcp.Server/docs/e2eTestPrompts.md
Add 2-3 natural language prompts that should trigger the new tool, in alphabetical order.
7c. Create Changelog Entry
Follow docs/changelog-entries.md instructions. Use the -ChangelogPath parameter pointing to servers/Azure.Mcp.Server/CHANGELOG.md.
Phase 8: PR Submission
Final Checklist
Before creating the PR, verify:
- [ ] Build passes:
dotnet buildsucceeds with 0 errors - [ ] Format clean:
dotnet format --verify-no-changespasses - [ ] All unit tests pass (including existing ones — no regressions)
- [ ] All live tests pass in Playback mode
- [ ] Recordings pushed and
assets.jsonupdated - [ ] Spell check passes:
Invoke-Cspell.ps1clean - [ ] ToolDescriptionEvaluator: Score >= 0.4, top 3 ranking
- [ ] Command registered in
AzureBackupSetup.cs - [ ] JSON context registered for AOT safety
- [ ] Telemetry tags added via
AzureBackupTelemetryTags - [ ] Documentation updated (commands.md, e2eTestPrompts.md, changelog, README.md, eng/vscode/README.md)
- [ ] Commands metadata regenerated via
Update-AzCommandsMetadata.ps1 - [ ] AOT/native build passes (
Build-Local.ps1 -IncludeNative) - [ ] One tool per PR (don't bundle unrelated changes)
Create the PR
Reference: File Locations
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 1 Oct 2026.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingtools/Azure.Mcp.Tools.AzureBackup/skills/azurebackup-add-tool/SKILL.md
Popularity
- Repository stars
- 3,724
- Repository forks
- 631
- 7-day trend score
- 41
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/microsoft/mcp/azurebackup-add-tool)