Skip to content

Conversation

@ankushbindlish2
Copy link
Member

What does this PR do?

[Provide a clear, concise description of the changes]

[Any additional context, screenshots, or information that helps reviewers]

GitHub issue number?

[Link to the GitHub issue this PR addresses]

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

Introduced the Azure File Shares toolset with 11 commands for managing file shares, snapshots, planning information, and private endpoint connections. Updated consolidated-tools.json, documentation, and changelogs to reflect new capabilities. Registered the new toolset in the solution and server startup. Added comprehensive command reference, implementation status, and supporting test projects.
Removed BaseFileSharesCommand and options classes, replaced command implementations with stubs inheriting from SubscriptionCommand. Updated FileShareListCommand to use new service and result model. Moved and renamed several model files to use schema-based naming. Deleted FileSharesJsonContext and related serialization attributes. This refactor prepares the codebase for a new command and model structure.
Enhanced the Bicep template to provision two file shares, two snapshots, a private endpoint, and related role assignments for more comprehensive testing. Updated the post-deployment script to output new resource details. Rewrote live tests to cover listing, retrieving, and snapshot operations for the new resource structure.
Refactors and significantly expands unit tests for FileShareListCommand, FileShareGetLimitsCommand, FileShareGetProvisioningRecommendationCommand, and FileShareGetUsageDataCommand. Adds comprehensive coverage for command initialization, option binding, execution, error handling, and input validation, including tests for tenant ID, various parameter combinations, and service exception scenarios. Improves test clarity and reliability by using dependency injection, NSubstitute, and explicit assertions.
Updated project references and package dependencies for both LiveTests and UnitTests projects. Consolidated and expanded global usings to reduce redundancy in test files. Added AssemblyAttributes.cs to UnitTests for environment variable cleanup and xUnit collection behavior. Refactored test classes to use new base classes and improved test coverage with additional assertions.
Replaces Azure.Mcp.Core.Tests references with Azure.Mcp.Tests in test files and updates global usings accordingly. Adds a BodyRegexSanitizer to FileSharesCommandTests to sanitize URLs in test recordings. Removes redundant XML doc comments from test methods and updates test class constructor to accept TestProxyFixture.
Refactored Bicep test resources to use explicit 'eastus' location and updated FileShare resources to use NFS protocol and new property schema. Enhanced test PowerShell script parameters for flexibility. Improved C# test assertions to check for non-null JSON value kinds and match expected resource names.
Introduces validation of deployment templates in New-TestResources.ps1 to catch errors before actual deployment. Improves error reporting and debugging output for failed validations. Also updates Deploy-TestResources.ps1 to pass the Force parameter explicitly.
Added new file patterns to .gitignore for Azure.Mcp.Tools.FileShares and StorageSync directories. Introduced .vscode/mcp.json to configure a local Azure MCP server for VSCode.
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

This PR adds a comprehensive Azure File Shares toolset for managing Azure File Shares resources through the MCP server. The implementation includes 11 commands covering file share management, snapshot operations, informational queries, and private endpoint connections.

Key Changes:

  • Complete File Shares toolset with 11 commands (list, get, create, delete, check name, snapshots, limits, recommendations, usage data, private endpoint connections)
  • Service layer implementation using Azure Resource Graph and ARM clients
  • Comprehensive unit and live test coverage
  • Integration with existing MCP infrastructure

Reviewed changes

Copilot reviewed 61 out of 61 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test-resources.bicep Bicep template defining test infrastructure with file shares, snapshots, virtual network, and private endpoints
test-resources-post.ps1 Post-deployment script that extracts and displays deployment outputs
Unit test files (3) Tests for informational commands (usage, limits, recommendations)
FileShareListCommandTests.cs Unit tests for file share list command
FileSharesCommandTests.cs Live integration tests for file shares operations
IFileSharesService.cs Service interface defining all file share operations
FileSharesService.cs Service implementation using ARM and Resource Graph
Command files (11) Command implementations (1 complete, 10 stubs)
Models (multiple) Data models for file shares, snapshots, and related resources
FileSharesSetup.cs Area setup registering services and commands
Program.cs Registration of FileSharesSetup in server
consolidated-tools.json Tool metadata for consolidated mode
Documentation files README, CHANGELOG, azmcp-commands.md updates
Solution file Added FileShares projects to solution

var operation = await armClient.GetGenericResources()
.CreateOrUpdateAsync(WaitUntil.Completed, fileShareId, fileShareData, cancellationToken);

var createdResource = operation.Value;
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

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

This assignment to createdResource is useless, since its value is never read.

Copilot uses AI. Check for mistakes.
Comment on lines +315 to +316
var operation = await armClient.GetGenericResources()
.CreateOrUpdateAsync(WaitUntil.Completed, snapshotResourceId, snapshotData, cancellationToken);
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

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

This assignment to operation is useless, since its value is never read.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

1 participant