[Doc Gap] Azure Backup protect/update-protection/undelete docs missing new `OperationId` field and updated `JobId` semantics

Aperta Adatta ai principianti
#3,962 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@akhil9tiet ci sta già lavorando.

Dal 16/10/2026.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
azure, csharp
Ambito
documentation

Direzione di ricerca

Inizia dalla sezione #### Protected Item di servers/Azure.Mcp.Server/docs/azmcp-commands.md, poi leggi i campi OperationId e JobId in tools/Azure.Mcp.Tools.AzureBackup/src/Models/ProtectResult.cs e OperationResult.cs. Aggiungi righe di commento per protect, update-protection e undelete che indichino quando jobId è null e dove compare operationId. Poi aggiungi le righe senza job sotto ## Azure Backup in servers/Azure.Mcp.Server/docs/e2eTestPrompts.md in ordine alfabetico, ed esegui lo script cspell su entrambi i file.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

copilot documentation server-Azure.Mcp tools-AzureBackup

Documentation Gap

Server: Azure.Mcp.Server
Tool directory: tools/Azure.Mcp.Tools.AzureBackup
Triggered by: commit 6a128caa0616e80f2542a3fec269d7408b7041b5 (PR #3838) by @shrja-ms
Changed files:

  • tools/Azure.Mcp.Tools.AzureBackup/src/Models/OperationResult.cs
  • tools/Azure.Mcp.Tools.AzureBackup/src/Models/ProtectResult.cs
  • tools/Azure.Mcp.Tools.AzureBackup/src/Services/DppBackupOperations.cs
  • tools/Azure.Mcp.Tools.AzureBackup/src/Services/RsvBackupOperations.cs
  • tools/Azure.Mcp.Tools.AzureBackup/src/Services/RsvBackupOperations.SelectiveDisk.cs

What Changed

PR #3838 fixed a bug where azurebackup protecteditem protect, update-protection, and undelete returned the async control-plane operation id in the jobId response field whenever no genuine backup job was available (jobId ??= operationId). That value 404s against azurebackup job get.

The fix:

  • Adds a new OperationId field to ProtectResult and OperationResult records.
  • JobId is now populated only from a real RSV ConfigureBackup job; it is null when no job exists.
  • The async operation id is now surfaced separately via OperationId.
  • Response messages now point users to azurebackup protecteditem get instead of suggesting a (potentially non-existent) job poll.

This is a user-facing response-schema and behavior change for the protect, update-protection, and undelete tools.

Gaps Found

  • azmcp-commands.md descriptions for azurebackup protecteditem protect, update-protection, and undelete do not mention the new OperationId field or clarify that JobId is now only populated for genuine ConfigureBackup jobs (other sections of this doc, e.g. Azure App Configuration, use inline # Returns: { ... } comments to document output fields — this pattern is missing here).
  • e2eTestPrompts.md has existing prompts for azurebackup_protecteditem_protect, azurebackup_protecteditem_update-protection, and azurebackup_protecteditem_undelete, but none exercise or describe the new no-job/OperationId-only scenario (e.g., DPP protect, or RSV protect/undelete where no ConfigureBackup job is found), so there's no documented expectation that jobId can be null while operationId is populated.
  • servers/Azure.Mcp.Server/README.md Azure Backup section ("Restore a soft-deleted backup item...") doesn't need structural changes, but could optionally note that job polling guidance now depends on whether a genuine job exists — low priority, not required.
Files to Update
  • servers/Azure.Mcp.Server/docs/azmcp-commands.md
  • servers/Azure.Mcp.Server/docs/e2eTestPrompts.md
Context
// tools/Azure.Mcp.Tools.AzureBackup/src/Models/ProtectResult.cs
public sealed record ProtectResult(
    string Status,
    string? ProtectedItemName,
    string? JobId,
    string? Message,
    string? ProtectionStatus = null,
    string? ErrorMessage = null,
    string? OperationId = null);
// tools/Azure.Mcp.Tools.AzureBackup/src/Models/OperationResult.cs
public sealed record OperationResult(
    string Status,
    string? JobId,
    string? Message,
    string? OperationId = null);
📐 Implementation Guide

This section contains step-by-step instructions for a coding agent to implement the changes described above.

Step 1: Modify files
  1. servers/Azure.Mcp.Server/docs/azmcp-commands.md (edit):

    • In the #### Protected Item section, update the protect command's leading comment to mention the OperationId field is returned in the response and clarify that JobId is null unless a genuine RSV ConfigureBackup job is found (DPP never returns a job id). Example addition to the comment block above azmcp azurebackup protecteditem protect ...:
      # Response includes 'jobId' (only when a genuine RSV ConfigureBackup job is found; always null for DPP)
      # and 'operationId' (the async control-plane operation id from the PUT request; use 'azurebackup
      # protecteditem get' to verify status rather than polling a non-existent job).
      
    • Apply the same clarification to update-protection and undelete command comment blocks, noting undelete always returns jobId: null and surfaces operationId instead.
  2. servers/Azure.Mcp.Server/docs/e2eTestPrompts.md (edit):

    • Under ## Azure Backup, add 1-2 new test prompt rows for azurebackup_protecteditem_protect and azurebackup_protecteditem_undelete that specifically describe scenarios with no genuine backup job (e.g., DPP protect, or verifying via protecteditem get after an operation-id-only response), keeping entries in alphabetical tool-name order within the section.
Step 2: Verify documentation structure

servers/Azure.Mcp.Server/docs/azmcp-commands.md — must include a global options table at the top and one ## azmcp <service> <resource> <operation>-style section per command with description, parameters table, and example usage block (existing format already followed here — only inline comment text needs updating).

servers/Azure.Mcp.Server/docs/e2eTestPrompts.md — must include a header, alphabetically ordered service area sections (## Azure Backup already present), and within each section a Tool Name | Test Prompt table with tools listed alphabetically; add new rows in the correct alphabetical position.

Use tools/Azure.Mcp.Tools.Storage/ as the canonical reference for toolset documentation patterns if additional structural guidance is needed.

Step 3: Validate

Run these commands in order. Each must succeed before proceeding to the next:

  1. dotnet build servers/Azure.Mcp.Server/ — confirms the server project compiles cleanly
  2. dotnet build tools/Azure.Mcp.Tools.AzureBackup/src/ — confirms the affected toolset compiles
  3. dotnet test tools/Azure.Mcp.Tools.AzureBackup/tests/Azure.Mcp.Tools.AzureBackup.Tests/ --filter "TestType!=Live" — runs unit tests for the affected toolset
  4. .\eng\common\spelling\Invoke-Cspell.ps1 — checks spelling in new or modified documentation

Next Steps

[!TIP]
Ready for automated implementation? Assign this issue to @copilot to have Copilot coding agent implement the changes described in the Implementation Guide above

Generated by Documentation Updater · copilot · auto · 66.2 AIC · ⌖ 7.48 AIC · ⊞ 11.2K · ◷

Lingua principale
C#
Stelle
3.9k
Fork
689
Merge medio
2g 11h
PR unite (30g)
143

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/mcp

Tutte le issue di microsoft/mcp

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.