Add 12 new OneLake tools: Security, Shortcuts, Settings#2625
Open
srinuthati78 wants to merge 9 commits into
Open
Add 12 new OneLake tools: Security, Shortcuts, Settings#2625srinuthati78 wants to merge 9 commits into
srinuthati78 wants to merge 9 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands the Fabric OneLake toolset by adding new Security (data access roles), Shortcuts, and Settings commands, while also refactoring DFS ListPath URL construction to align with the ADLS Gen2 Path List API (directory as a query parameter). It also updates documentation and adds unit tests around the new commands.
Changes:
- Added 12 new OneLake commands covering data access roles, shortcuts (incl. reset-cache), and workspace-level settings modifications.
- Refactored DFS ListPath URL building to be ADLS Gen2 Path List API compliant and consolidated directory path resolution.
- Updated OneLake + Fabric Server READMEs and added changelog entries for the feature and the DFS ListPath behavior change.
Reviewed changes
Copilot reviewed 48 out of 48 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Shortcut/ShortcutResetCacheCommandTests.cs | Adds unit tests for shortcut cache reset command metadata/options. |
| tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Shortcut/ShortcutListCommandTests.cs | Adds unit tests for shortcut list command metadata/options. |
| tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Shortcut/ShortcutGetCommandTests.cs | Adds unit tests for shortcut get command metadata/options. |
| tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Shortcut/ShortcutDeleteCommandTests.cs | Adds unit tests for shortcut delete command metadata/options. |
| tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Shortcut/ShortcutCreateOrUpdateCommandTests.cs | Adds unit tests for shortcut bulk create/update command metadata/options. |
| tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Settings/SettingsGetCommandTests.cs | Adds unit tests for settings get command metadata/options. |
| tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Settings/ImmutabilityPolicyModifyCommandTests.cs | Adds unit tests for immutability policy modify command metadata/options. |
| tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Settings/DiagnosticsModifyCommandTests.cs | Adds unit tests for diagnostics modify command metadata/options. |
| tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Security/DataAccessRoleListCommandTests.cs | Adds unit tests for data access role list command metadata/options. |
| tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Security/DataAccessRoleGetCommandTests.cs | Adds unit tests for data access role get command metadata/options. |
| tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Security/DataAccessRoleDeleteCommandTests.cs | Adds unit tests for data access role delete command metadata/options. |
| tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Security/DataAccessRoleCreateOrUpdateCommandTests.cs | Adds unit tests for data access role upsert command metadata/options. |
| tools/Fabric.Mcp.Tools.OneLake/src/Services/OneLakeService.cs | Refactors blob/DFS list path URL building and adds Fabric Core API calls for roles/shortcuts/settings. |
| tools/Fabric.Mcp.Tools.OneLake/src/Services/IOneLakeService.cs | Extends service contract with role/shortcut/settings operations. |
| tools/Fabric.Mcp.Tools.OneLake/src/Options/ShortcutResetCacheOptions.cs | Adds option model for reset shortcut cache command. |
| tools/Fabric.Mcp.Tools.OneLake/src/Options/ShortcutListOptions.cs | Adds option model for shortcut listing (incl. parent path). |
| tools/Fabric.Mcp.Tools.OneLake/src/Options/ShortcutGetOptions.cs | Adds option model for shortcut retrieval (name + path). |
| tools/Fabric.Mcp.Tools.OneLake/src/Options/ShortcutDeleteOptions.cs | Adds option model for shortcut deletion (name + path). |
| tools/Fabric.Mcp.Tools.OneLake/src/Options/ShortcutCreateOrUpdateOptions.cs | Adds option model for bulk shortcut create/update (JSON + overwrite flag). |
| tools/Fabric.Mcp.Tools.OneLake/src/Options/SettingsGetOptions.cs | Adds option model for settings retrieval. |
| tools/Fabric.Mcp.Tools.OneLake/src/Options/ImmutabilityPolicyModifyOptions.cs | Adds option model for immutability policy modification (JSON). |
| tools/Fabric.Mcp.Tools.OneLake/src/Options/DiagnosticsModifyOptions.cs | Adds option model for diagnostics modification (JSON). |
| tools/Fabric.Mcp.Tools.OneLake/src/Options/DataAccessRoleListOptions.cs | Adds option model for listing data access roles. |
| tools/Fabric.Mcp.Tools.OneLake/src/Options/DataAccessRoleGetOptions.cs | Adds option model for getting a data access role by name. |
| tools/Fabric.Mcp.Tools.OneLake/src/Options/DataAccessRoleDeleteOptions.cs | Adds option model for deleting a data access role by name. |
| tools/Fabric.Mcp.Tools.OneLake/src/Options/DataAccessRoleCreateOrUpdateOptions.cs | Adds option model for upserting a data access role (JSON). |
| tools/Fabric.Mcp.Tools.OneLake/src/Options/FabricOptionDefinitions.cs | Introduces new CLI option definitions for roles, shortcuts, and settings JSON payloads. |
| tools/Fabric.Mcp.Tools.OneLake/src/Models/ShortcutModels.cs | Adds shortcut request/response + target models for Fabric Core API serialization. |
| tools/Fabric.Mcp.Tools.OneLake/src/Models/SettingsModels.cs | Adds settings request/response models for diagnostics and immutability policy. |
| tools/Fabric.Mcp.Tools.OneLake/src/Models/DataAccessRoleModels.cs | Adds data access role and decision rule/member models. |
| tools/Fabric.Mcp.Tools.OneLake/src/Models/OneLakeJsonContext.cs | Registers new models/command results for source-generated JSON serialization. |
| tools/Fabric.Mcp.Tools.OneLake/src/FabricOneLakeSetup.cs | Registers new commands in DI and adds them to the OneLake command group. |
| tools/Fabric.Mcp.Tools.OneLake/src/Commands/Shortcut/ShortcutResetCacheCommand.cs | Implements shortcut cache reset command. |
| tools/Fabric.Mcp.Tools.OneLake/src/Commands/Shortcut/ShortcutListCommand.cs | Implements shortcut listing command. |
| tools/Fabric.Mcp.Tools.OneLake/src/Commands/Shortcut/ShortcutGetCommand.cs | Implements shortcut get command. |
| tools/Fabric.Mcp.Tools.OneLake/src/Commands/Shortcut/ShortcutDeleteCommand.cs | Implements shortcut delete command. |
| tools/Fabric.Mcp.Tools.OneLake/src/Commands/Shortcut/ShortcutCreateOrUpdateCommand.cs | Implements bulk shortcut create/update command. |
| tools/Fabric.Mcp.Tools.OneLake/src/Commands/Settings/SettingsGetCommand.cs | Implements settings get command. |
| tools/Fabric.Mcp.Tools.OneLake/src/Commands/Settings/DiagnosticsModifyCommand.cs | Implements settings diagnostics PATCH command. |
| tools/Fabric.Mcp.Tools.OneLake/src/Commands/Settings/ImmutabilityPolicyModifyCommand.cs | Implements immutability policy PATCH command. |
| tools/Fabric.Mcp.Tools.OneLake/src/Commands/Security/DataAccessRoleListCommand.cs | Implements data access role listing command. |
| tools/Fabric.Mcp.Tools.OneLake/src/Commands/Security/DataAccessRoleGetCommand.cs | Implements data access role get command. |
| tools/Fabric.Mcp.Tools.OneLake/src/Commands/Security/DataAccessRoleCreateOrUpdateCommand.cs | Implements data access role upsert command. |
| tools/Fabric.Mcp.Tools.OneLake/src/Commands/Security/DataAccessRoleDeleteCommand.cs | Implements data access role delete command. |
| tools/Fabric.Mcp.Tools.OneLake/README.md | Updates OneLake tool documentation with new security/shortcuts/settings sections and examples. |
| servers/Fabric.Mcp.Server/README.md | Extends server tool list to include new OneLake security/shortcut/settings tools. |
| servers/Fabric.Mcp.Server/changelog-entries/1778530268679.yaml | Adds changelog entry for the DFS ListPath ADLS Gen2 spec alignment. |
| servers/Fabric.Mcp.Server/changelog-entries/1778530260238.yaml | Adds changelog entry for the 12 new OneLake tools. |
- Data Access Security: list, get, create-or-update, delete roles - Shortcuts: list, get, create-or-update, delete, reset-cache - Settings: get, modify-diagnostics, modify-immutability-policy - Refactored DFS ListPath methods to follow ADLS Gen2 Path List API spec - Consolidated path resolution logic via ResolveDirectoryPath helper - Added 233 unit tests (309 total OneLake tests passing) - Updated OneLake and Fabric Server READMEs with new tool documentation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
4dcdd9b to
fc25c12
Compare
- Validate role definition JSON: catch JsonException, check non-empty name - Dispose HttpResponseMessage in SendFabricApiDeleteRequestAsync - Fix broken link in OneLake README (Fabric.Mcp.Tools.Core/src -> Core) - Remove incorrect --role-name param from create-or-update docs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… add LRO unit tests - Fix CreateOrUpdateShortcutsAsync returning empty response when bulkCreate returns 200 with no body - Add 202 Accepted (LRO) handling to SendFabricApiRequestAsync: detect Location header, poll operations endpoint until Succeeded/Failed - Add PollFabricLroAsync and GetFabricLroResultAsync private methods with configurable retry logic - Add LroModels.cs (OperationState, OperationError) registered in OneLakeJsonContext for AOT safety - Add OneLakeServiceLroTests.cs with 6 unit tests covering: single-poll success, multi-poll success, succeeded with no result URL, failed operation throws, 202 with no Location header, synchronous 200 path - Fix data access security model bugs across security/shortcut/settings commands and tests
…mplifications, description fixes - Refactor 12 OneLake security/shortcut/settings commands to GUID-only (workspace-id, item-id) - Add pagination support (continuationToken) for list_data_access_roles and list_shortcuts - Simplify result classes to sealed records - Use new(...) shorthand for ResponseResult.Create calls - Remove cross-tool name references from descriptions - Remove CLI formatting from shortcut conflict policy description Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Update OneLakeSettings to include lifecycle and immutabilityPolicies (array) - Rename DiagnosticsSettings to OneLakeDiagnosticSettings with status/destination fields - Add DiagnosticsDestination, LakehouseReference, ImmutabilityPolicy, LifecycleSettings models - Remove unused DiagnosticsCategory, DiagnosticsModifyRequest, ImmutabilityPolicyModifyRequest - Register new types in OneLakeJsonContext for AOT safety - Update SettingsGetCommand description to mention lifecycle Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tions - Set Destructive = true on upsert/modify commands per reviewer feedback: DataAccessRoleCreateOrUpdate, ShortcutCreateOrUpdate, ImmutabilityPolicyModify, DiagnosticsModify - Add configurable --lro-timeout option (default 5 min) for LRO commands: DiagnosticsModify, ShortcutCreateOrUpdate, ShortcutResetCache - Change PollFabricLroAsync from fixed MaxAttempts to elapsed-time tracking - Improve tool descriptions for better ToolDescriptionEvaluator scores - Update test assertions to match new descriptions and Destructive flags Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move Fabric.Mcp.Tools.OneLake.Tests.csproj into tests/Fabric.Mcp.Tools.OneLake.Tests/ subdirectory to match the CI pipeline's expected path convention. Update solution references and fix project reference path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
[Provide a clear, concise description of the changes][Add additional context, screenshots, or information that helps reviewers]GitHub issue number?
[Link to the GitHub issue this PR addresses]Pre-merge Checklist
servers/Azure.Mcp.Server/README.mdand/orservers/Fabric.Mcp.Server/README.mddocumentationREADME.mdchanges running the script./eng/scripts/Process-PackageReadMe.ps1. See Package READMEToolDescriptionEvaluatorand obtained a score of0.4or more and a top 3 ranking for all related test promptsconsolidated-tools.jsonbreaking-changelabelservers/Azure.Mcp.Server/docs/azmcp-commands.md./eng/scripts/Update-AzCommandsMetadata.ps1to update tool metadata inazmcp-commands.md(required for CI)servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline