Skip to content

Add 12 new OneLake tools: Security, Shortcuts, Settings#2625

Open
srinuthati78 wants to merge 9 commits into
microsoft:mainfrom
srinuthati78:srthatip/onesecurityandshortcuts
Open

Add 12 new OneLake tools: Security, Shortcuts, Settings#2625
srinuthati78 wants to merge 9 commits into
microsoft:mainfrom
srinuthati78:srthatip/onesecurityandshortcuts

Conversation

@srinuthati78
Copy link
Copy Markdown
Contributor

@srinuthati78 srinuthati78 commented May 11, 2026

  • 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

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

  • 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
    • Created a changelog entry if the change falls among the following: new feature, bug fix, UI/UX update, breaking change, or updated dependencies. Follow the changelog entry guide
  • 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 running the script ./eng/scripts/Process-PackageReadMe.ps1. See Package README
    • 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 renamed tools, follow the Tool Rename Checklist and tag the PR with the breaking-change label
    • 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 command list in servers/Azure.Mcp.Server/docs/azmcp-commands.md
    • Ran ./eng/scripts/Update-AzCommandsMetadata.ps1 to update tool metadata in azmcp-commands.md (required for CI)
    • 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

Copilot AI review requested due to automatic review settings May 11, 2026 20:15
@srinuthati78 srinuthati78 requested a review from a team as a code owner May 11, 2026 20:15
Copy link
Copy Markdown
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 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.

Comment thread tools/Fabric.Mcp.Tools.OneLake/src/Services/OneLakeService.cs Outdated
Comment thread tools/Fabric.Mcp.Tools.OneLake/src/Services/OneLakeService.cs
Comment thread tools/Fabric.Mcp.Tools.OneLake/README.md Outdated
- 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>
@srinuthati78 srinuthati78 force-pushed the srthatip/onesecurityandshortcuts branch from 4dcdd9b to fc25c12 Compare May 11, 2026 20:39
Srinivas Thatipamula and others added 3 commits May 11, 2026 13:43
- 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
Comment thread tools/Fabric.Mcp.Tools.OneLake/src/Commands/Settings/DiagnosticsModifyCommand.cs Outdated
Comment thread tools/Fabric.Mcp.Tools.OneLake/src/Commands/Shortcut/ShortcutResetCacheCommand.cs Outdated
Comment thread tools/Fabric.Mcp.Tools.OneLake/src/Services/OneLakeService.cs
Comment thread tools/Fabric.Mcp.Tools.OneLake/src/Services/OneLakeService.cs Outdated
Comment thread tools/Fabric.Mcp.Tools.OneLake/src/Services/OneLakeService.cs
Srinivas Thatipamula and others added 4 commits May 13, 2026 10:32
…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>
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.

3 participants