Add 12 new OneLake tools: Security, Shortcuts, Settings#2625
Add 12 new OneLake tools: Security, Shortcuts, Settings#2625srinuthati78 wants to merge 6 commits into
Conversation
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. |
4dcdd9b to
fc25c12
Compare
jongio
left a comment
There was a problem hiding this comment.
Nice work adding 12 new OneLake tools for security roles, shortcuts, and workspace settings. The command structure follows existing Fabric OneLake patterns, tests cover the main scenarios well (the LRO polling coverage is especially solid), and the AOT serialization context is properly registered. Three things caught my eye — details in inline comments.
ListDataAccessRolesAsync missing preview=true — Get, CreateOrUpdate, and Delete all append ?preview=true, but the List endpoint at line 1922 doesn't. Is the List API GA while the others are preview? If so a brief comment explaining the difference would help. If not, looks like an oversight.
CreateOrUpdateDataAccessRoleAsync returns deserialized input, not server response — After the POST, the response stream is discarded (line 1963) and the original roleDefinition (the input) is returned. Any server-assigned or normalized fields (id, eTag, timestamps) won't make it to the caller. CreateOrUpdateShortcutsAsync handles this correctly by reading and deserializing the response.
Settings modify methods skip JSON validation — ModifyDiagnosticsAsync and ModifyImmutabilityPolicyAsync pass raw JSON straight through without deserializing first. The data access role and shortcut create methods validate input via deserialization, giving a clear ArgumentException for malformed JSON. Worth aligning for consistency?
7a04798 to
2263957
Compare
2263957 to
714e2e8
Compare
- 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>
- 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>
…e creation - ModifyDiagnosticsAsync and ModifyImmutabilityPolicyAsync now validate JSON input early with JsonDocument.Parse, throwing a clear ArgumentException for malformed JSON. - CreateOrUpdateDataAccessRoleAsync now reads and deserializes the API response stream to preserve server-assigned fields (id, eTag, etc.), aligning with CreateOrUpdateShortcutsAsync behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
02cce2f to
5c23e69
Compare
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