Skip to content

Add Azure Service Fabric managed clusters toolset#1696

Merged
anannya03 merged 13 commits intomicrosoft:mainfrom
linmeng08:main
Feb 17, 2026
Merged

Add Azure Service Fabric managed clusters toolset#1696
anannya03 merged 13 commits intomicrosoft:mainfrom
linmeng08:main

Conversation

@linmeng08
Copy link
Contributor

@linmeng08 linmeng08 commented Feb 11, 2026

What does this PR do?

Add Azure Service Fabric managed clusters toolset

Service Fabric managed cluster

Add new Azure.Mcp.Tools.ServiceFabric toolset with two commands:

  • servicefabric managedcluster node list: List all nodes in a Service Fabric managed cluster via direct REST API
  • servicefabric managedcluster nodetype restart: Restart nodes from a Service Fabric managed cluster (POST with JSON body)

GitHub issue number?

1695

Pre-merge Checklist

  • Required for All PRs
    • Read contribution guidelines
    • PR title clearly describes the change
    • Commit history is clean with descriptive messages (cleanup guide)
    • Added comprehensive tests for new/modified functionality
    • Updated servers/Azure.Mcp.Server/CHANGELOG.md and/or servers/Fabric.Mcp.Server/CHANGELOG.md for product changes (features, bug fixes, UI/UX, updated dependencies)
  • For MCP tool changes:
    • One tool per PR: This PR adds or modifies only one MCP tool for faster review cycles
    • Updated servers/Azure.Mcp.Server/README.md and/or servers/Fabric.Mcp.Server/README.md documentation
    • Validate README.md changes using script at eng/scripts/Process-PackageReadMe.ps1. See Package README
    • Updated command list in /servers/Azure.Mcp.Server/docs/azmcp-commands.md and/or /docs/fabric-commands.md
    • Run .\eng\scripts\Update-AzCommandsMetadata.ps1 to update tool metadata in azmcp-commands.md (required for CI)
    • For new or modified tool descriptions, ran ToolDescriptionEvaluator and obtained a score of 0.4 or more and a top 3 ranking for all related test prompts
    • For tools with new names, including new tools or renamed tools, update consolidated-tools.json
    • For new tools associated with Azure services or publicly available tools/APIs/products, add URL to documentation in the PR description
  • Extra steps for Azure MCP Server tool changes:
    • Updated test prompts in /servers/Azure.Mcp.Server/docs/e2eTestPrompts.md
    • 👉 For Community (non-Microsoft team member) PRs:
      • Security review: Reviewed code for security vulnerabilities, malicious code, or suspicious activities before running tests (crypto mining, spam, data exfiltration, etc.)
      • Manual tests run: added comment /azp run mcp - pullrequest - live to run Live Test Pipeline

Add new Azure.Mcp.Tools.ServiceFabric toolset with two commands:
- servicefabric managedcluster node list: List all nodes in a managed cluster via direct REST API
- servicefabric managedcluster nodetype restart: Restart nodes of a specific node type (POST with JSON body)

Implementation uses direct ARM REST API calls via IHttpClientFactory + bearer token
authentication, since the nodes endpoint is not exposed in the Azure SDK, but Azure Portal uses it to display the list of nodes on the managed cluster view.

Includes:
- Models matching the actual REST API response schema (nested id + properties)
- AOT-safe JSON serialization with ServiceFabricJsonContext
- UpdateType option constrained to Default/ByUpgradeDomain via AcceptOnlyFromAmong
- 26 unit tests covering both commands
- Live test infrastructure (Bicep template, post-deployment script, assets.json)
- E2E test prompts in e2eTestPrompts.md
- Add Azure Service Fabric Operations section to azmcp-commands.md
- Add Service Fabric to README.md supported services list
- Add consolidated tool entries for node list and nodetype restart
@github-actions
Copy link

Thank you for your contribution @linmeng08! We will review the pull request and get back to you soon.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Azure.Mcp.Tools.ServiceFabric toolset to Azure MCP Server to manage Service Fabric managed clusters, specifically for listing nodes and restarting nodes in a node type via ARM REST APIs.

Changes:

  • Introduces servicefabric managedcluster node list and servicefabric managedcluster nodetype restart commands and registers the new area in Azure.Mcp.Server.
  • Adds Service Fabric REST client/service implementation plus option/model plumbing and System.Text.Json source-gen context.
  • Adds unit tests, live/recorded tests scaffolding, and updates server docs/tool catalog entries.

Reviewed changes

Copilot reviewed 32 out of 32 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
tools/Azure.Mcp.Tools.ServiceFabric/src/Services/ServiceFabricService.cs Implements ARM REST calls for node listing + node restart.
tools/Azure.Mcp.Tools.ServiceFabric/src/Services/IServiceFabricService.cs Service contract for Service Fabric operations.
tools/Azure.Mcp.Tools.ServiceFabric/src/Commands/ManagedCluster/ManagedClusterNodeListCommand.cs CLI/tool command for listing managed cluster nodes.
tools/Azure.Mcp.Tools.ServiceFabric/src/Commands/ManagedCluster/ManagedClusterNodeTypeRestartCommand.cs CLI/tool command for restarting managed cluster nodes.
tools/Azure.Mcp.Tools.ServiceFabric/src/Commands/ServiceFabricJsonContext.cs Source-gen JSON context for tool inputs/outputs.
tools/Azure.Mcp.Tools.ServiceFabric/src/Commands/BaseServiceFabricCommand.cs Base command type for Service Fabric commands (subscription-scoped).
tools/Azure.Mcp.Tools.ServiceFabric/src/Options/ServiceFabricOptionDefinitions.cs Command-line option definitions for cluster/node operations.
tools/Azure.Mcp.Tools.ServiceFabric/src/Options/BaseServiceFabricOptions.cs Base options type for Service Fabric commands.
tools/Azure.Mcp.Tools.ServiceFabric/src/Options/ManagedCluster/ManagedClusterNodeTypeRestartOptions.cs Options binding for node restart.
tools/Azure.Mcp.Tools.ServiceFabric/src/Options/ManagedCluster/ManagedClusterNodeTypeListOptions.cs Options binding for node list.
tools/Azure.Mcp.Tools.ServiceFabric/src/Models/ManagedClusterNode.cs Models for node list response payloads.
tools/Azure.Mcp.Tools.ServiceFabric/src/Models/RestartNodeRequest.cs Model for restart request payload.
tools/Azure.Mcp.Tools.ServiceFabric/src/Models/RestartNodeResponse.cs Model for restart response headers/body data.
tools/Azure.Mcp.Tools.ServiceFabric/src/ServiceFabricSetup.cs Registers the new servicefabric area and command groups.
tools/Azure.Mcp.Tools.ServiceFabric/src/GlobalUsings.cs Adds global System.CommandLine usage.
tools/Azure.Mcp.Tools.ServiceFabric/src/Azure.Mcp.Tools.ServiceFabric.csproj New tool project definition.
tools/Azure.Mcp.Tools.ServiceFabric/src/AssemblyInfo.cs InternalsVisibleTo for test projects.
tools/Azure.Mcp.Tools.ServiceFabric/tests/test-resources.bicep Test infra for deploying a managed cluster in CI/live tests.
tools/Azure.Mcp.Tools.ServiceFabric/tests/test-resources-post.ps1 Post-deploy test resource hook placeholder.
tools/Azure.Mcp.Tools.ServiceFabric/tests/Azure.Mcp.Tools.ServiceFabric.UnitTests/* Unit tests for node list + restart commands.
tools/Azure.Mcp.Tools.ServiceFabric/tests/Azure.Mcp.Tools.ServiceFabric.LiveTests/* Recorded/live test scaffolding + node list test.
servers/Azure.Mcp.Server/src/Program.cs Registers the new Service Fabric area.
servers/Azure.Mcp.Server/docs/e2eTestPrompts.md Adds e2e prompts for the new tools.
servers/Azure.Mcp.Server/docs/azmcp-commands.md Adds CLI docs for new commands.
servers/Azure.Mcp.Server/README.md Lists Azure Service Fabric as a supported service area.
core/Azure.Mcp.Core/src/Areas/Server/Resources/consolidated-tools.json Adds consolidated tool mappings/metadata for the new tools.
servers/Azure.Mcp.Server/Azure.Mcp.Server.slnx Adds new tool projects to the server solution filter.
Microsoft.Mcp.slnx Adds new tool projects to the repo solution filter.

@joshfree
Copy link
Member

@anannya03 can you help @linmeng08 get setup (CODEOWNERS, label, permissions)

@joshfree
Copy link
Member

@chlowell could you also give this a quick review as a Service Fabric fan

@joshfree joshfree added this to the 2026-02 milestone Feb 11, 2026
@joshfree joshfree moved this from Untriaged to In Progress in Azure MCP Server Feb 11, 2026
@joshfree joshfree added the tools-ServiceFabric Service Fabric label Feb 11, 2026
Copy link
Member

@joshfree joshfree left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add an entry to .github/CODEOWNERS and a CHANGELOG entry

@joshfree joshfree added the onboarding New service or MCP child server to onboard label Feb 11, 2026
@linmeng08 linmeng08 requested a review from a team as a code owner February 11, 2026 19:34
@linmeng08
Copy link
Contributor Author

linmeng08 commented Feb 12, 2026

Please add an entry to .github/CODEOWNERS and a CHANGELOG entry

Thanks! Added.

@anannya03
Copy link
Contributor

The PR looks great! Thanks @linmeng08
We're good to merge the PR.

@anannya03 anannya03 merged commit 809fdd5 into microsoft:main Feb 17, 2026
15 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Azure MCP Server Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community contribution customer-reported onboarding New service or MCP child server to onboard tools-ServiceFabric Service Fabric

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants