Skip to content

Conversation

@srinuthati78
Copy link

What does this PR do?

`Add Fabric OneLake MCP toolset with friendly-name support and docs

PR Description

Summary
Add a dedicated Fabric OneLake toolset with commands for workspaces, items, paths, and files, backed by a new service layer, option definitions, and JSON models.
Expand the test suite with command, service, and integration-style coverage to validate both GUID and friendly-name identifier flows, plus supporting scripts and fixtures.
Refresh Fabric MCP documentation to explain friendly-name behavior, clean up obsolete debug wiring, and restore local MCP client configuration for development.
Testing
dotnet build
dotnet test tools/Fabric.Mcp.Tools.OneLake/tests/Fabric.Mcp.Tools.OneLake.Tests.csproj

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 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

Srinivas Thatipamula added 10 commits October 21, 2025 15:54
…MCP tools

- Add FileDeleteCommand for individual file deletion from OneLake storage
- Add DirectoryDeleteCommand with recursive deletion support for directories
- Implement DeleteDirectoryAsync in OneLakeService using blob API endpoints
- Update command registration in FabricOneLakeSetup
- Add JSON serialization contexts for new command results
- Create comprehensive README.md with:
  - Complete documentation for all 9 OneLake commands with usage examples
  - Multi-environment support (PROD, DAILY, DXT, MSIT) configuration
  - Cross-platform environment variable setup instructions
  - Common usage patterns for data pipelines and analytics workflows
  - Error handling guidance and MCP client integration examples
  - Practical PowerShell scripting examples for bulk operations

All delete functionality tested and working correctly with proper error handling.
…leanup

✨ Major Features:
- Add complete test suite with 74 tests (100% passing)
- Implement all 11 OneLake MCP command tests with ExecuteAsync patterns
- Add testable service architecture patterns demonstration
- Clean up service interfaces removing redundant methods

🧪 Test Implementation:
- 68 command tests covering all OneLake MCP commands
- 6 service architecture tests demonstrating dependency injection patterns
- Comprehensive ExecuteAsync testing with service mocking
- Constructor validation, error handling, and parameter binding tests

🔧 Interface Cleanup:
- Remove redundant Fabric API methods from IOneLakeService and OneLakeService
- Keep OneLake-specific methods (ListOneLakeWorkspacesAsync, ListOneLakeItemsAsync, etc.)
- Add private GetWorkspaceAsync helper for internal use
- Maintain backward compatibility for existing commands

📚 Documentation:
- Add comprehensive test documentation (README.md, TestImplementationSummary.md)
- Update main README.md with development guidelines and test information
- Document testable architecture patterns for future development

🏗️ Architecture:
- Demonstrate testable service patterns with dependency injection
- Show parameter validation before API calls approach
- Provide examples for future service layer refactoring
- Maintain production reliability while enabling comprehensive testing

✅ Verification:
- All tests pass (74/74) with sub-2-second execution
- Clean build with no compilation errors
- Production-ready with comprehensive error handling
- Follows established MCP command patterns
Copilot AI review requested due to automatic review settings November 7, 2025 23:11
@srinuthati78 srinuthati78 requested review from a team as code owners November 7, 2025 23:11
@github-project-automation github-project-automation bot moved this to Untriaged in Azure MCP Server Nov 7, 2025
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 introduces comprehensive OneLake MCP Tools for Microsoft Fabric, adding 11 new commands to manage OneLake data lake storage through AI agents and MCP clients. The implementation includes full test coverage (74 passing tests), support for multiple Fabric environments (PROD, DAILY, DXT, MSIT), and extensive documentation.

Key Changes:

  • Added 11 OneLake commands (workspace, item, file, and directory operations)
  • Implemented comprehensive test suite with 100% command coverage
  • Added support for friendly-name identifiers alongside GUIDs
  • Created extensive documentation and troubleshooting guides

Reviewed Changes

Copilot reviewed 52 out of 52 changed files in this pull request and generated 31 comments.

Show a summary per file
File Description
upload_files_simple.ps1 PowerShell script for bulk file uploads (contains hardcoded user path)
upload_files.ps1 Enhanced PowerShell upload script (contains hardcoded user path)
tools/Fabric.Mcp.Tools.OneLake/upload_files_simple.ps1 Duplicate of root upload script
tools/Fabric.Mcp.Tools.OneLake/upload_files.ps1 Duplicate of root upload script
tools/Fabric.Mcp.Tools.OneLake/tests/TestImplementationSummary.md Documentation of test implementation and coverage
tools/Fabric.Mcp.Tools.OneLake/tests/Services/OneLakeServiceTests.cs Service layer test demonstrating testable architecture patterns
tools/Fabric.Mcp.Tools.OneLake/tests/README.md Test configuration and execution documentation
tools/Fabric.Mcp.Tools.OneLake/tests/FabricOneLakeSetupTests.cs Setup and registration tests
tools/Fabric.Mcp.Tools.OneLake/tests/Fabric.Mcp.Tools.OneLake.Tests.csproj Test project configuration
tools/Fabric.Mcp.Tools.OneLake/tests/Commands/*.cs Comprehensive command tests for all 11 OneLake commands
tools/Fabric.Mcp.Tools.OneLake/src/Services/OneLakeService.cs Core service implementation for OneLake operations
tools/Fabric.Mcp.Tools.OneLake/src/Services/IOneLakeService.cs Service interface definition
tools/Fabric.Mcp.Tools.OneLake/src/Options/*.cs Option definitions for commands
tools/Fabric.Mcp.Tools.OneLake/src/Models/*.cs Model definitions for OneLake entities
tools/Fabric.Mcp.Tools.OneLake/src/Commands/**/*.cs Implementation of all 11 OneLake commands
tools/Fabric.Mcp.Tools.OneLake/README.md Comprehensive usage documentation
servers/Fabric.Mcp.Server/src/Program.cs Registration of OneLake setup
servers/Fabric.Mcp.Server/*.md Documentation updates for OneLake tools
AzureMcp.sln Solution file updates
Comments suppressed due to low confidence (1)

tools/Fabric.Mcp.Tools.OneLake/tests/TestImplementationSummary.md:1

  • Duplicate entries in the commands table. Lines 208-209 repeat the same Directory Create and Directory Delete entries that appear in lines 206-207. Remove the duplicate rows.

Comment on lines +300 to +316
foreach (var prefix in blobPrefixes)
{
var nameElement = prefix.Element(ns + "Name");
if (nameElement?.Value != null)
{
var dirName = nameElement.Value.TrimEnd('/');
files.Add(new OneLakeFileInfo
{
Name = Path.GetFileName(dirName),
Path = dirName,
Size = 0,
LastModified = null,
ContentType = "application/x-directory",
IsDirectory = true
});
}
}
Copy link

Copilot AI Nov 7, 2025

Choose a reason for hiding this comment

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

This foreach loop immediately maps its iteration variable to another variable - consider mapping the sequence explicitly using '.Select(...)'.

Copilot uses AI. Check for mistakes.
Comment on lines +604 to +607
catch (Exception ex)
{
throw new InvalidOperationException($"Failed to parse OneLake items list response: {ex.Message}", ex);
}
Copy link

Copilot AI Nov 7, 2025

Choose a reason for hiding this comment

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

Generic catch clause.

Copilot uses AI. Check for mistakes.
Comment on lines +634 to +637
catch (Exception ex)
{
allResponses.Add($"<!-- Error accessing folder {folder}: {ex.Message} -->");
}
Copy link

Copilot AI Nov 7, 2025

Choose a reason for hiding this comment

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

Generic catch clause.

Copilot uses AI. Check for mistakes.
Comment on lines +700 to +703
catch (Exception ex)
{
allResponses.Add($"/* Error accessing folder {folder}: {ex.Message} */");
}
Copy link

Copilot AI Nov 7, 2025

Choose a reason for hiding this comment

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

Generic catch clause.

Copilot uses AI. Check for mistakes.
@joshfree joshfree added the server-Fabric.Mcp Microsoft Fabric MCP Server label Nov 10, 2025
@srinuthati78
Copy link
Author

@microsoft-github-policy-service agree company="Microsoft"

@microsoft-github-policy-service agree company="Microsoft"

@srinuthati78 srinuthati78 force-pushed the srthatip/onelakemcptools branch from cad82bc to ec91e11 Compare November 26, 2025 20:04
@srinuthati78 srinuthati78 reopened this Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

server-Fabric.Mcp Microsoft Fabric MCP Server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants