Migrate Fabric tools to new tool design#3097
Open
alzimmermsft wants to merge 4 commits into
Open
Conversation
alzimmermsft
requested review from
JasonYeMSFT,
RickWinter,
anannya03,
jongio,
joshfree,
sandeep-sen and
vukelich
July 17, 2026 22:28
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
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 withAuthenticatedCommand<TOptions, TResult>and removes System.CommandLine option definition plumbing. - Introduces/updates option POCOs with
[Option(Description=...)](including sharedOneLakeOptionDescriptions) and removes legacy*OptionDefinitionsclasses andSystem.CommandLinepackage references. - Updates OneLake shortcut conflict policy handling to use a typed
ShortcutConflictPolicyenum 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." | |||
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?
Migrates Fabric tools to new design where Register and Bind options are based on
Optionattributes.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