Skip to content

Migrate Fabric tools to new tool design#3097

Open
alzimmermsft wants to merge 4 commits into
microsoft:mainfrom
alzimmermsft:MigrateFabricOneLakeToolsToNewDesign
Open

Migrate Fabric tools to new tool design#3097
alzimmermsft wants to merge 4 commits into
microsoft:mainfrom
alzimmermsft:MigrateFabricOneLakeToolsToNewDesign

Conversation

@alzimmermsft

Copy link
Copy Markdown
Contributor

What does this PR do?

Migrates Fabric tools to new design where Register and Bind options are based on Option attributes.

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

@alzimmermsft alzimmermsft self-assigned this Jul 17, 2026
Copilot AI review requested due to automatic review settings July 17, 2026 22:28
@alzimmermsft
alzimmermsft requested review from a team as code owners July 17, 2026 22:28
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Migrates Microsoft Fabric tool implementations away from explicit RegisterOptions/BindOptions (System.CommandLine) toward the attribute-driven options model ([Option]), aligning Fabric toolsets with the newer command/option design patterns used across the repo.

Changes:

  • Replaces many GlobalCommand<T> implementations with AuthenticatedCommand<TOptions, TResult> and removes System.CommandLine option definition plumbing.
  • Introduces/updates option POCOs with [Option(Description=...)] (including shared OneLakeOptionDescriptions) and removes legacy *OptionDefinitions classes and System.CommandLine package references.
  • Updates OneLake shortcut conflict policy handling to use a typed ShortcutConflictPolicy enum across service + tests.

Reviewed changes

Copilot reviewed 113 out of 113 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tools/Fabric.Mcp.Tools.OneLake/tests/Fabric.Mcp.Tools.OneLake.Tests/Services/OneLakeServiceShortcutTests.cs Updates shortcut test to use the new ShortcutConflictPolicy enum.
tools/Fabric.Mcp.Tools.OneLake/src/Services/OneLakeService.cs Refactors service internals and updates shortcut APIs to use ShortcutConflictPolicy?.
tools/Fabric.Mcp.Tools.OneLake/src/Services/IOneLakeService.cs Updates service interface shortcut methods to accept ShortcutConflictPolicy?.
tools/Fabric.Mcp.Tools.OneLake/src/Prompts/OneLakePrompts.cs Modernizes prompt message array construction.
tools/Fabric.Mcp.Tools.OneLake/src/Options/WorkspaceListOptions.cs Switches option descriptions to shared constants.
tools/Fabric.Mcp.Tools.OneLake/src/Options/TableNamespaceListOptions.cs Switches option descriptions to shared constants.
tools/Fabric.Mcp.Tools.OneLake/src/Options/TableNamespaceGetOptions.cs Switches option descriptions to shared constants.
tools/Fabric.Mcp.Tools.OneLake/src/Options/TableListOptions.cs Switches option descriptions to shared constants.
tools/Fabric.Mcp.Tools.OneLake/src/Options/TableGetOptions.cs Switches option descriptions to shared constants.
tools/Fabric.Mcp.Tools.OneLake/src/Options/TableConfigGetOptions.cs Switches option descriptions to shared constants.
tools/Fabric.Mcp.Tools.OneLake/src/Options/ShortcutResetCacheOptions.cs Converts options to attribute-driven binding and tightens required workspace ID.
tools/Fabric.Mcp.Tools.OneLake/src/Options/ShortcutListOptions.cs Converts shortcut list options to attribute-driven binding with required IDs.
tools/Fabric.Mcp.Tools.OneLake/src/Options/ShortcutGetOptions.cs Converts shortcut get options to attribute-driven binding with required IDs.
tools/Fabric.Mcp.Tools.OneLake/src/Options/ShortcutDeleteOptions.cs Converts shortcut delete options to attribute-driven binding with required IDs.
tools/Fabric.Mcp.Tools.OneLake/src/Options/ShortcutCreateS3CompatibleOptions.cs Adds new typed options for S3-compatible shortcut creation.
tools/Fabric.Mcp.Tools.OneLake/src/Options/ShortcutCreateOneLakeOptions.cs Adds new typed options for OneLake-to-OneLake shortcut creation.
tools/Fabric.Mcp.Tools.OneLake/src/Options/ShortcutCreateOneDriveSharePointOptions.cs Adds new typed options for OneDrive/SharePoint shortcut creation.
tools/Fabric.Mcp.Tools.OneLake/src/Options/ShortcutCreateGcsOptions.cs Adds new typed options for Google Cloud Storage shortcut creation.
tools/Fabric.Mcp.Tools.OneLake/src/Options/ShortcutCreateDataverseOptions.cs Adds new typed options for Dataverse shortcut creation.
tools/Fabric.Mcp.Tools.OneLake/src/Options/ShortcutCreateAzureBlobOptions.cs Adds new typed options for Azure Blob shortcut creation.
tools/Fabric.Mcp.Tools.OneLake/src/Options/ShortcutCreateAmazonS3Options.cs Adds new typed options for Amazon S3 shortcut creation.
tools/Fabric.Mcp.Tools.OneLake/src/Options/ShortcutCreateAdlsGen2Options.cs Adds new typed options for ADLS Gen2 shortcut creation.
tools/Fabric.Mcp.Tools.OneLake/src/Options/SettingsGetOptions.cs Converts settings options to attribute-driven binding and adds workspace alias.
tools/Fabric.Mcp.Tools.OneLake/src/Options/PathListOptions.cs Converts path listing options to use shared descriptions and seals the type.
tools/Fabric.Mcp.Tools.OneLake/src/Options/OneLakeOptionDescriptions.cs Adds a shared constants holder for OneLake option descriptions.
tools/Fabric.Mcp.Tools.OneLake/src/Options/OneLakeOptionDefinitions.cs Removes legacy System.CommandLine option definitions.
tools/Fabric.Mcp.Tools.OneLake/src/Options/ImmutabilityPolicyModifyOptions.cs Converts immutability options to attribute-driven binding and required properties.
tools/Fabric.Mcp.Tools.OneLake/src/Options/FabricOptionDefinitions.cs Removes large legacy System.CommandLine option definitions for OneLake tools.
tools/Fabric.Mcp.Tools.OneLake/src/Options/DiagnosticsModifyOptions.cs Converts diagnostics modify options to attribute-driven binding and required properties.
tools/Fabric.Mcp.Tools.OneLake/src/Options/DataAccessRoleListOptions.cs Converts data access role list options to attribute-driven binding.
tools/Fabric.Mcp.Tools.OneLake/src/Options/DataAccessRoleGetOptions.cs Converts data access role get options to attribute-driven binding.
tools/Fabric.Mcp.Tools.OneLake/src/Options/DataAccessRoleDeleteOptions.cs Converts data access role delete options to attribute-driven binding.
tools/Fabric.Mcp.Tools.OneLake/src/Options/DataAccessRoleCreateOrUpdateOptions.cs Converts data access role create/update options to attribute-driven binding.
tools/Fabric.Mcp.Tools.OneLake/src/Options/BlobListOptions.cs Converts blob list options to use shared descriptions and seals the type.
tools/Fabric.Mcp.Tools.OneLake/src/Models/TableGetResult.cs Adjusts model usings for System.Text.Json.
tools/Fabric.Mcp.Tools.OneLake/src/Models/ShortcutConflictPolicy.cs Introduces typed enum for shortcut conflict policy.
tools/Fabric.Mcp.Tools.OneLake/src/Models/BlobDownloadOptions.cs Removes unused using(s).
tools/Fabric.Mcp.Tools.OneLake/src/GlobalUsings.cs Removes global usings tied to System.CommandLine/Json.
tools/Fabric.Mcp.Tools.OneLake/src/Fabric.Mcp.Tools.OneLake.csproj Removes System.CommandLine dependency and normalizes project reference path.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Workspace/OneLakeWorkspaceListCommand.cs Simplifies result type to a record and adjusts response creation.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Table/TableNamespaceListCommand.cs Converts to record result + simplifies identifier selection.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Table/TableNamespaceGetCommand.cs Converts to record result + simplifies identifier selection.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Table/TableListCommand.cs Converts to record result + simplifies identifier selection.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Table/TableGetCommand.cs Converts to record result + simplifies identifier selection.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Table/TableConfigGetCommand.cs Converts to record result + simplifies identifier selection.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Shortcut/ShortcutResetCacheCommand.cs Migrates from GlobalCommand binding to AuthenticatedCommand with attribute-bound options.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Shortcut/ShortcutListCommand.cs Migrates from GlobalCommand binding to AuthenticatedCommand with attribute-bound options.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Shortcut/ShortcutGetCommand.cs Migrates from GlobalCommand binding to AuthenticatedCommand with attribute-bound options.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Shortcut/ShortcutDeleteCommand.cs Migrates from GlobalCommand binding to AuthenticatedCommand with attribute-bound options.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Shortcut/ShortcutCreateS3CompatibleCommand.cs Migrates shortcut create command to new options type and enum-based conflict policy.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Shortcut/ShortcutCreateOneLakeCommand.cs Migrates shortcut create command to new options type and enum-based conflict policy.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Shortcut/ShortcutCreateOneDriveSharePointCommand.cs Migrates shortcut create command to new options type and enum-based conflict policy.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Shortcut/ShortcutCreateGcsCommand.cs Migrates shortcut create command to new options type and enum-based conflict policy.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Shortcut/ShortcutCreateDataverseCommand.cs Migrates shortcut create command to new options type and enum-based conflict policy.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Shortcut/ShortcutCreateAzureBlobCommand.cs Migrates shortcut create command to new options type and enum-based conflict policy.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Shortcut/ShortcutCreateAmazonS3Command.cs Migrates shortcut create command to new options type and enum-based conflict policy.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Shortcut/ShortcutCreateAdlsGen2Command.cs Migrates shortcut create command to new options type and enum-based conflict policy.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Settings/SettingsGetCommand.cs Moves System.CommandLine validators into ValidateOptions and updates execution signature.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Settings/ImmutabilityPolicyModifyCommand.cs Moves System.CommandLine validators into ValidateOptions and updates execution signature.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Settings/DiagnosticsModifyCommand.cs Moves System.CommandLine validators into ValidateOptions and updates execution signature.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Security/DataAccessRoleListCommand.cs Moves System.CommandLine validators into ValidateOptions and updates execution signature.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Security/DataAccessRoleGetCommand.cs Moves System.CommandLine validators into ValidateOptions and updates execution signature.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Security/DataAccessRoleDeleteCommand.cs Moves System.CommandLine validators into ValidateOptions and updates execution signature.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Security/DataAccessRoleCreateOrUpdateCommand.cs Migrates to attribute-bound options and updates validation + JSON construction flow.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Item/OneLakeItemListDfsCommand.cs Simplifies command result type to a record and updates option descriptions.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Item/OneLakeItemListCommand.cs Simplifies command result type to a record and updates option descriptions.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/Item/OneLakeItemDataListCommand.cs Simplifies command result type to a record and updates option descriptions.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/File/PathListCommand.cs Updates result model to record and adjusts response creation.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/File/FileWriteCommand.cs Updates option descriptions to shared constants.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/File/FileReadCommand.cs Updates option descriptions to shared constants and removes custom status mapping.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/File/FileDeleteCommand.cs Updates option descriptions to shared constants and removes custom status mapping.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/File/DirectoryDeleteCommand.cs Updates option descriptions to shared constants and record formatting.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/File/DirectoryCreateCommand.cs Converts result creation to record constructor usage and updates option descriptions.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/File/BlobPutCommand.cs Updates option descriptions to shared constants.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/File/BlobListCommand.cs Converts result type to record and adjusts raw vs parsed response handling.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/File/BlobGetCommand.cs Updates option descriptions to shared constants and removes custom status mapping.
tools/Fabric.Mcp.Tools.OneLake/src/Commands/File/BlobDeleteCommand.cs Updates option descriptions to shared constants and removes custom status mapping.
tools/Fabric.Mcp.Tools.Docs/src/Services/NetworkResourceProviderService.cs Converts to file-scoped namespace + primary constructor and tidies HTTP logic.
tools/Fabric.Mcp.Tools.Docs/src/Services/IResourceProviderService.cs Promotes ResourceType to top-level and uses file-scoped namespace.
tools/Fabric.Mcp.Tools.Docs/src/Services/FabricPublicApiService.cs Removes unused local variable in examples retrieval.
tools/Fabric.Mcp.Tools.Docs/src/Services/EmbeddedResourceProviderService.cs Converts to file-scoped namespace + primary constructor and reformats helpers.
tools/Fabric.Mcp.Tools.Docs/src/Options/PublicApis/WorkloadCommandOptions.cs Seals options type for attribute-based binding.
tools/Fabric.Mcp.Tools.Docs/src/Options/FabricOptionDefinitions.cs Removes legacy option definitions.
tools/Fabric.Mcp.Tools.Docs/src/Options/BestPractices/GetBestPracticesOptions.cs Seals options type for attribute-based binding.
tools/Fabric.Mcp.Tools.Docs/src/GlobalUsings.cs Removes global usings tied to System.CommandLine/Json.
tools/Fabric.Mcp.Tools.Docs/src/Fabric.Mcp.Tools.Docs.csproj Removes System.CommandLine dependency and normalizes project reference path.
tools/Fabric.Mcp.Tools.Docs/src/Commands/PublicApis/GetWorkloadApisCommand.cs Removes unused options import after migration.
tools/Fabric.Mcp.Tools.Docs/src/Commands/BestPractices/GetWorkloadDefinitionCommand.cs Removes unused options import after migration.
tools/Fabric.Mcp.Tools.Docs/src/Commands/BestPractices/GetExamplesCommand.cs Removes unused options import after migration.
tools/Fabric.Mcp.Tools.Docs/src/Commands/BestPractices/GetBestPracticesCommand.cs Removes unused options import after migration.
tools/Fabric.Mcp.Tools.DataFactory/src/Options/Pipeline/RunPipelineOptions.cs Seals options type for attribute-based binding.
tools/Fabric.Mcp.Tools.DataFactory/src/Options/Pipeline/ListPipelinesOptions.cs Seals options type for attribute-based binding.
tools/Fabric.Mcp.Tools.DataFactory/src/Options/Pipeline/GetPipelineOptions.cs Seals options type for attribute-based binding.
tools/Fabric.Mcp.Tools.DataFactory/src/Options/Pipeline/CreatePipelineOptions.cs Seals options type for attribute-based binding.
tools/Fabric.Mcp.Tools.DataFactory/src/Options/Dataflow/ListDataflowsOptions.cs Seals options type for attribute-based binding.
tools/Fabric.Mcp.Tools.DataFactory/src/Options/Dataflow/ExecuteQueryOptions.cs Seals options type for attribute-based binding.
tools/Fabric.Mcp.Tools.DataFactory/src/Options/Dataflow/CreateDataflowOptions.cs Seals options type for attribute-based binding.
tools/Fabric.Mcp.Tools.DataFactory/src/Options/DataFactoryOptionDefinitions.cs Removes legacy option definitions.
tools/Fabric.Mcp.Tools.DataFactory/src/GlobalUsings.cs Removes global usings tied to System.CommandLine/Json.
tools/Fabric.Mcp.Tools.DataFactory/src/Fabric.Mcp.Tools.DataFactory.csproj Removes System.CommandLine dependency and normalizes project reference path.
tools/Fabric.Mcp.Tools.DataFactory/src/Commands/Pipeline/RunPipelineCommand.cs Simplifies result creation to record ctor usage and removes unused import.
tools/Fabric.Mcp.Tools.DataFactory/src/Commands/Pipeline/ListPipelinesCommand.cs Removes unused options import after migration.
tools/Fabric.Mcp.Tools.DataFactory/src/Commands/Pipeline/GetPipelineCommand.cs Simplifies result creation to record ctor usage and removes unused import.
tools/Fabric.Mcp.Tools.DataFactory/src/Commands/Pipeline/CreatePipelineCommand.cs Simplifies result creation to record ctor usage and removes unused import.
tools/Fabric.Mcp.Tools.DataFactory/src/Commands/Dataflow/ListDataflowsCommand.cs Removes unused options import after migration.
tools/Fabric.Mcp.Tools.DataFactory/src/Commands/Dataflow/ExecuteQueryCommand.cs Removes unused options import after migration.
tools/Fabric.Mcp.Tools.DataFactory/src/Commands/Dataflow/CreateDataflowCommand.cs Simplifies result creation to record ctor usage and removes unused import.
tools/Fabric.Mcp.Tools.Core/src/Options/CoreOptionDefinitions.cs Removes legacy option definitions.
tools/Fabric.Mcp.Tools.Core/src/Fabric.Mcp.Tools.Core.csproj Removes System.CommandLine dependency and normalizes project reference path.
tools/Fabric.Mcp.Tools.Core/src/Commands/ItemCreateCommand.cs Simplifies ternary + result creation and removes unused import.
tools/Fabric.Mcp.Tools.Core/src/Commands/CatalogSearchCommand.cs Simplifies result creation and removes unused import.
servers/Fabric.Mcp.Server/changelog-entries/1784327317889.yaml Adds changelog entry documenting a breaking change.


namespace Fabric.Mcp.Tools.OneLake.Options;

public sealed class ShortcutCreateGcrsOptions
Comment on lines +29 to +30
[Option(Description = OneLakeOptionDescriptions.TargetSubpath)]
public required string TargetSubpath { get; set; }
Comment on lines +35 to +36
[Option(Description = "The bucket name for S3-compatible targets.")]
public string? TargetBucket { get; set; }
Comment on lines +32 to +33
[Option(Description = "The Delta Lake folder path in Dataverse.")]
public required string TargetDeltalakeFolder { get; set; }
internal const string Workspace = "The name or ID of the Microsoft Fabric workspace.";
internal const string ItemId = "The ID of the Fabric item.";
internal const string Item = "The name or ID of the Fabric item. When using friendly names, MUST include the item type suffix (e.g., 'ItemName.Lakehouse', 'ItemName.Warehouse').";
internal const string FilePath = "The path to the file in Onelake.";
@@ -0,0 +1,3 @@
changes:
- section: "Breaking Changes"
description: "Removed unused paramters from Fabric tools."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants