Skip to content

feat(fabric): add core_create-workspace with capacity support - #3853

Closed
Amos Hersch (AmosHersch) wants to merge 1 commit into
amoshersch-fabric-list-itemsfrom
amoshersch-fabric-create-workspace
Closed

Amos Hersch (AmosHersch) wants to merge 1 commit into
amoshersch-fabric-list-itemsfrom
amoshersch-fabric-create-workspace

Conversation

@AmosHersch

@AmosHersch Amos Hersch (AmosHersch) commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds exactly one Fabric Core tool, core_create-workspace (fabmcp core create-workspace), implementing the synchronous Create Workspace REST API.

Depends directly on #3843, List Items; the ultimate target remains main. This existing PR and branch were rebased in place for the user-authorized conflict-prevention chain. The immediate base is amoshersch-fabric-list-items at 38e5a09ecf14ba1129e666a7a5d9df3c377eadc4; this layer is one commit, dd17c5230fbcdb28f5b78d0baf0cf11cdbdc9ca7, changing 24 files relative to that parent. No replacement PR, merge, closure, or native-stack metadata change was made.

  • Accepts required display-name and optional description, capacity-id, and domain-id. Validates the 256/4000-character limits, reserved workspace name, and nonempty UUIDs before authentication. Omits unspecified fields and preserves an explicitly empty description.
  • Sends one application-level POST /v1/workspaces, including optional capacity/domain assignment in that request. No capacity/domain provisioning, name resolution, availability lookup, assignToCapacity call, automatic retry, or LRO polling.
  • Requires 201 Created and returns source-generated workspace management metadata plus optional Location. Missing Location is valid. Returned URLs are never followed; no operation handle or capacity-completion state is invented.
  • Preserves failure status, sanitizes errors/logs, and exposes only validated Retry-After guidance. Cancellation, network failure, or invalid success after sending can mean the workspace was already created; the existing uncertain-outcome warnings remain intact.
  • Uses flat options, the two-generic command pattern, typed MCP output, and mutating/non-idempotent annotations. Read-only mode hides and blocks creation. Existing injected credentials and the DataFactory-registered per-request provider bridge are unchanged.
  • Adds offline command/service/serialization/registered-handler coverage, Fabric README guidance, four selection prompts, and a Fabric changelog entry. All lower-layer tools, suites, and documentation are retained cumulatively.

This layer reuses the #3855 foundation's private authenticated send with explicit ResponseHeadersRead and named cancellation, FabricCoreHttpHelpers.GetRetryAfter, and the thread-safe FabricCoreHttpMessageHandler. The duplicate creation-specific parser/handler and send extraction are removed. Creation request/output DTOs, options, validator, command/error behavior, response ownership, and specialized cancellation double remain operation-specific. Six additional boundary cases verify retry-header normalization, integer limits, and rejection behavior. Legacy create-item/search-catalog and inherited read operations are unchanged.

The lower chain includes the #3854 stdout/stderr validator fix. There are no additional engineering, shared framework, production host/proxy, authentication, project, or dependency changes in this layer. Existing host discovery tests retain all five default/all-tools cases and now verify the cumulative catalog and new mutation annotations.

GitHub issue number?

No tracking issue was supplied or created for this user-requested single-tool change and authorized in-place reorganization.

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 - Not run; score/ranking requirement waived for this PR by the Fabric MCP maintainer.
    • 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

The consolidated mapping, rename checklist, and Azure MCP-specific items are not applicable: this adds one Fabric tool, renames none, and the Fabric host uses NullConsolidatedToolDefinitionProvider. Prompts are in the Fabric server's own documentation.

Cumulative validation after adaptation

.NET SDK 10.0.401. 916 focused offline tests passed, zero failed/skipped: 909 Core, five host, and two credential-bridge cases. The Core total retains all 749 parent cases and includes 160 creation cases. Discovery contains eight Core tools / 54 total Fabric tools; all 21 prompt rows are present, including the inherited 17 and the four creation prompts.

Command Result
dotnet build '.\tools\Fabric.Mcp.Tools.Core\src\Fabric.Mcp.Tools.Core.csproj' --no-restore --nologo --verbosity quiet Passed; zero warnings/errors.
dotnet build '.\tools\Fabric.Mcp.Tools.Core\tests\Fabric.Mcp.Tools.Core.Tests\Fabric.Mcp.Tools.Core.Tests.csproj' --no-restore --nologo --verbosity quiet Passed; zero warnings/errors.
dotnet test --project '.\tools\Fabric.Mcp.Tools.Core\tests\Fabric.Mcp.Tools.Core.Tests\Fabric.Mcp.Tools.Core.Tests.csproj' --no-build --no-restore --no-progress Passed: 909 tests, none skipped.
dotnet build '.\servers\Fabric.Mcp.Server\src\Fabric.Mcp.Server.csproj' --no-restore --nologo --verbosity quiet Passed; zero warnings/errors.
dotnet build '.\servers\Fabric.Mcp.Server\tests\Fabric.Mcp.Server.Tests\Fabric.Mcp.Server.Tests.csproj' --no-restore --nologo --verbosity quiet Passed; zero warnings/errors.
dotnet test --project '.\servers\Fabric.Mcp.Server\tests\Fabric.Mcp.Server.Tests\Fabric.Mcp.Server.Tests.csproj' --no-build --no-restore --no-progress Passed: all five inherited stdio/loopback HTTP startup/discovery cases. No Fabric API calls.
dotnet test --project '.\tools\Fabric.Mcp.Tools.DataFactory\tests\Fabric.Mcp.Tools.DataFactory.Tests\Fabric.Mcp.Tools.DataFactory.Tests.csproj' --no-restore --filter-class '*ProviderDelegatingCredentialTests' --no-progress Passed: two existing offline tests.
dotnet format '.\tools\Fabric.Mcp.Tools.Core\src\Fabric.Mcp.Tools.Core.csproj' --no-restore --verify-no-changes --include $source --verbosity quiet Passed for all 12 layer source C# files.
dotnet format '.\tools\Fabric.Mcp.Tools.Core\tests\Fabric.Mcp.Tools.Core.Tests\Fabric.Mcp.Tools.Core.Tests.csproj' --no-restore --verify-no-changes --include $tests --verbosity quiet Passed for all seven layer Core test C# files.
dotnet format '.\servers\Fabric.Mcp.Server\tests\Fabric.Mcp.Server.Tests\Fabric.Mcp.Server.Tests.csproj' --no-restore --verify-no-changes --include '.\servers\Fabric.Mcp.Server\tests\Fabric.Mcp.Server.Tests\Infrastructure\ServerStartupTests.cs' --verbosity quiet Passed.
.\eng\common\spelling\Invoke-Cspell.ps1 -FileList $paths -PackageInstallCache $cache Passed: all 24 layer files, zero spelling issues. Isolated tooling cache removed.
.\eng\scripts\Process-PackageReadMe.ps1 -Command validate -InputReadMePath '.\servers\Fabric.Mcp.Server\README.md' Exited 0; the same 14 existing heading-level warnings were verified against the frozen parent's README.
.\eng\scripts\Compile-Changelog.ps1 -ChangelogPath '.\servers\Fabric.Mcp.Server\CHANGELOG.md' -DryRun All 17 cumulative entries validated; compiled changelogs not modified.
& '.\servers\Fabric.Mcp.Server\src\bin\Debug\fabmcp.exe' 'tools' 'list' '--name-only' Passed with stdout/stderr separated: exact eight Core names and 54 total tools; all 21 prompt rows matched.
& '.\eng\scripts\Test-ToolSelectionPrompts.ps1' -ServerName 'Fabric.Mcp.Server' -OutputPath $output Passed, using a fresh current-branch self-contained, trimmed Debug win-x64 publication: 54 tools loaded, one server tested, zero skipped, zero violations.
git -c core.longpaths=true diff --check '38e5a09ecf14ba1129e666a7a5d9df3c377eadc4..HEAD' Passed.

$source, $tests, and $paths were explicit layer-relative changed-file arrays, including new files. $cache was an isolated session-local package-tooling cache. $output was Join-Path $PWD '.work\stack-3853-prompt-build', verified absent before the fresh validator build. Git's long-path setting was a per-invocation override, not a configuration-file change.

The original stderr/JSON validator limitation is resolved by the inherited #3854 fix, and the actual script now passes on this branch. This is catalog-name validation, not a ToolDescriptionEvaluator score. No additional engineering workaround was introduced here.

Recovery and publication

The create-only local recovery ref refs/backup/fabric-stack-3853-20261005 retains the original head 08224980aa6de61c0f688b17e5b9eeb55de92ab6. Only the original tool slice after historical fork d4df988aae3ba1de008efe10f664f12817bdcc24 was rebased onto the frozen List Items tip. Publication used an explicit force-with-lease against that original remote head. Both PRs' open/draft/unlocked state, absence of auto-merge/queue, empty native-stack membership, and exact live refs were revalidated before publication and retargeting.

Live main at 0fa879ecf7c51946fa17e73304e468558c351b6c was observed only, not imported or used as a new rebase target. Earlier layers and their frozen refs were not mutated.

Pending and not performed

  • ToolDescriptionEvaluator: not run; maintainer exemption. The Fabric MCP maintainer has waived the score/ranking requirement for this PR. Configuration is unavailable; no score or top-three ranking is claimed. The checkbox remains unchecked because the evaluator was not run. Normal code review and required CI still apply.
  • Live Fabric calls, real workspace creation, real OBO authorization, and recorded playback: not performed. All creation requests use substituted HTTP and credentials. The user scoped live/recorded infrastructure and real-service evidence out of this reorganization. Handler/startup tests do not prove live authorization or playback.
  • Full-repository suites, package/NPX verification, and native publish were not run. The scoped prompt-validator publication is trimmed/self-contained, not native AOT. No PowerShell, project, or package files change relative to the immediate parent.
  • Hosted CI remains in progress/pending, not claimed all green. The new-head snapshot showed successful CLA, SpellCheck, and SDL agentless-tag checks, with Azure Pipelines, link verification, and policy automation still queued/running. Actual required CI and human review remain applicable.
  • This remains a draft. No live-test pipeline, automatic merge, PR closure, or native-stack metadata mutation was requested or performed.

Invoking Livetests

Copilot submitted PRs are not trustworthy by default. Users with write access to the repo need to validate the contents of this PR before leaving a comment with the text /azp run mcp - pullrequest - live. This will trigger the necessary livetest workflows to complete required validation.

@azure-pipelines

azure-pipelines Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Azure Pipelines:
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions github-actions Bot added the server-Fabric.Mcp Microsoft Fabric MCP Server label Oct 5, 2026
@AmosHersch
Amos Hersch (AmosHersch) force-pushed the amoshersch-fabric-create-workspace branch from 0822498 to dd17c52 Compare October 5, 2026 22:42
@AmosHersch
Amos Hersch (AmosHersch) changed the base branch from main to amoshersch-fabric-list-items October 5, 2026 22:42
@AmosHersch
Amos Hersch (AmosHersch) force-pushed the amoshersch-fabric-create-workspace branch 2 times, most recently from 88d5454 to 60be5f8 Compare October 6, 2026 12:28
@AmosHersch
Amos Hersch (AmosHersch) force-pushed the amoshersch-fabric-create-workspace branch 2 times, most recently from 56b5c46 to e7e4562 Compare October 7, 2026 11:49
@AmosHersch
Amos Hersch (AmosHersch) marked this pull request as ready for review October 7, 2026 12:53
@AmosHersch
Amos Hersch (AmosHersch) requested a review from a team as a code owner October 7, 2026 12:53
Copilot AI balanced review requested due to automatic review settings October 7, 2026 12:53

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.

Copilot review overview

🟡 Changes recommended

The response model incorrectly requires an optional API field, causing valid successful responses to be reported as failures.

Review effort: Balanced
Findings: 1 High severity

Open (1)
What changed in this PR

Adds the Fabric Core core_create-workspace tool with optional capacity and domain assignment.

Changes:

  • Implements validated workspace creation and typed responses.
  • Registers the tool with read-only safeguards and documentation.
  • Adds comprehensive offline, serialization, and discovery tests.
File Description
WorkspaceCreateToolRegistrationTests.cs Tests MCP registration and behavior.
WorkspaceCreateTestData.cs Provides creation test fixtures.
WorkspaceCreateCancellationStream.cs Supports cancellation testing.
FabricCoreServiceWorkspaceCreateTests.cs Tests service request and response handling.
tests/​README.md Documents creation tests.
WorkspaceCreateSerializationTests.cs Tests JSON contracts.
FabricCoreSetupTests.cs Verifies command registration.
WorkspaceCreateCommandTests.cs Tests command validation and failures.
WorkspaceCreateInputValidator.cs Validates creation inputs.
WorkspaceCreateRequestException.cs Carries status and retry guidance.
IFabricCoreService.cs Adds the creation service contract.
FabricCoreService.cs Implements the Fabric API request.
WorkspaceCreateOptions.cs Defines command options.
WorkspaceCreateResult.cs Defines the typed result.
CreateWorkspaceRequest.cs Defines the request payload.
CreatedWorkspaceTag.cs Defines returned tag metadata.
CreatedWorkspaceMetadata.cs Defines returned workspace metadata.
CoreJsonContext.cs Registers new serialization types.
FabricCoreSetup.cs Registers and advertises the command.
WorkspaceCreateCommand.cs Implements command execution and errors.
ServerStartupTests.cs Verifies host discovery metadata.
Fabric.Mcp.Server/​README.md Documents usage and permissions.
e2eTestPrompts.md Adds tool-selection prompts.
amoshersch-fabric-core-create-workspace.yaml Adds the feature changelog entry.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Create Fabric workspaces in one synchronous request with optional capacity and domain assignment, typed metadata, guarded inputs, sanitized errors, and offline coverage.

Co-authored-by: Copilot App <[email protected]>
@AmosHersch

Copy link
Copy Markdown
Contributor Author

Superseded by #3887, which has merged into main with this layer's changes and the associated fixes. Closing this PR to avoid merging the same work again; its original review history is preserved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

server-Fabric.Mcp Microsoft Fabric MCP Server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants