Skip to content

feat(fabric): add core_update-workspace tool - #3851

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

Amos Hersch (AmosHersch) wants to merge 1 commit into
amoshersch-fabric-create-workspacefrom
amoshersch-fabric-update-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_update-workspace (fabmcp core update-workspace), for the synchronous Update Workspace REST API.

Depends directly on #3853, Create Workspace; 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-create-workspace at dd17c5230fbcdb28f5b78d0baf0cf11cdbdc9ca7. This layer is one commit, 946865bd09d184929650ed3c8ee6eb54b6144cf9, changing 24 files relative to that parent. No replacement PR, merge, closure, or native-stack metadata mutation was made.

  • Requires a nonempty workspace UUID and at least one supplied display name or description. Enforces the 256/4000-character limits and reserved workspace name; Fabric enforces tenant-wide name uniqueness.
  • Sends only supplied properties. Omitted/null values leave a property unchanged; an explicit empty description clears it. There are no empty default DTO overwrites.
  • Makes one application-level PATCH, with no tool-implemented retries, prefetch/name resolution, follow-up requests, polling, or enrichment. Existing HTTP client/handler redirect behavior is unchanged: this is not a one-wire-hop guarantee. Application code does not navigate response URLs.
  • Returns source-generated, whitelisted workspace metadata: ID, display name, type, and optional description, with returned-ID validation. Does not update capacity, domain, identity, permissions, tags, endpoints, items, or data. Update output remains deliberately distinct from the richer Create/Get Workspace DTOs.
  • Uses mutating, destructive, idempotent metadata; standard consent and read-only enforcement; validation before authentication; cancellation/disposal; and sanitized status-preserving failures with validated Retry-After guidance. Invalid or unexpected success payloads fail explicitly. Errors after sending can leave the actual update outcome uncertain; the original warnings remain intact.
  • Preserves the host credential provider -> DataFactory delegating TokenCredential -> Core service injection. No authentication or transport redesign.
  • Adds offline command/service/serialization/registered-MCP coverage, Fabric README guidance, four selection prompts, and one Fabric changelog entry while retaining all lower-layer tools, suites, and documentation.

The adaptation reuses the #3855 foundation's private authenticated send with its original buffered ResponseContentRead default and named cancellation, FabricCoreHttpHelpers.GetRetryAfter, and thread-safe FabricCoreHttpMessageHandler. The duplicate send extraction and update-specific test HTTP handler are removed. The original command, options, input validator, request/result DTOs, and throttling exception are byte-for-byte unchanged; specialized cancellation content and all prior assertions remain. Nine additional Retry-After boundary cases cover normalization, integer limits, dates, and invalid values. Existing operations retain their own completion settings and error/output contracts.

The lower chain includes the #3854 stdout/stderr validator fix. This layer adds no engineering, shared framework, production host/proxy, authentication, project, or dependency changes. Cumulative discovery assertions are extended rather than relaxed, and all five inherited default/all-tools host cases remain.

GitHub issue number?

N/A. No tracking issue was supplied or created for this user-requested tool 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

Consolidated mappings, the rename checklist, and Azure-server-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. 1,056 focused offline tests passed, zero failed/skipped: 1,049 Core, five host, and two credential-bridge cases. All 909 parent Core cases remain, with 140 Update Workspace cases. The named WorkspaceGetMcpTests, WorkspaceGetServiceTests, ItemListMcpTests, and ItemListServiceTests files are unchanged from the frozen parent. Discovery contains nine Core tools / 55 total Fabric tools. All 25 prompt rows match the catalog, including all 21 inherited rows retained unchanged.

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: 1,049 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 operations.
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 11 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 eight 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 issues. Isolated cache removed.
.\eng\scripts\Process-PackageReadMe.ps1 -Command validate -InputReadMePath 'servers\Fabric.Mcp.Server\README.md' Completed with the same 14 existing heading-level warnings, verified against the frozen parent's README.
.\eng\scripts\Compile-Changelog.ps1 -ChangelogPath 'servers\Fabric.Mcp.Server\CHANGELOG.md' -DryRun All 18 cumulative entries validated; compiled changelogs were not modified.
& '.\servers\Fabric.Mcp.Server\src\bin\Debug\fabmcp.exe' 'tools' 'list' '--name-only' Passed with stdout/stderr separated: exactly nine expected Core names, 55 total names, and all 25 prompt rows matched.
& '.\eng\scripts\Test-ToolSelectionPrompts.ps1' -ServerName 'Fabric.Mcp.Server' -OutputPath $output Passed on a fresh current-commit self-contained, trimmed Debug win-x64 publication: 55 tools loaded, one server tested, zero skipped, zero violations.
git -c core.longpaths=true diff --check 'dd17c5230fbcdb28f5b78d0baf0cf11cdbdc9ca7..HEAD' -- Passed.

$source, $tests, and $paths were explicit layer-relative changed-file arrays. $cache was an isolated session-local spelling directory. $output was Join-Path $PWD '.work\stack-3851-prompt-build', verified absent before the fresh validator build. Git long-path support was process-local, not a configuration-file change.

Coverage retains omitted/null/empty fields, UUID and length boundaries, four-field schemas, response validation, sanitized HTTP/Retry-After failures, cancellation/disposal, concurrent credentials, simulated consent/decline, legacy/compact/duplicated output, and existing POST regressions. Read-only discovery excludes core_create-item, core_create-workspace, and core_update-workspace and blocks update execution without authentication or HTTP.

The old stderr/JSON validator limitation is resolved by inherited #3854, and the actual script now passes here. This is catalog-name validation, not a ToolDescriptionEvaluator score. Historical standalone evidence included a startup timeout followed by a passing isolated rerun; the current cumulative five-case host run passed. No timeout or specialized output assertions were relaxed.

Recovery and publication

The create-only local recovery ref refs/backup/fabric-stack-3851-20261005 retains original head 8a4a6c1ad2ba6b349246268133c3aa29b3de4c42. Only its verified single tool commit after historical fork d4df988aae3ba1de008efe10f664f12817bdcc24 was rebased onto the exact frozen Create Workspace tip. Publication used only the explicit lease --force-with-lease=refs/heads/amoshersch-fabric-update-workspace:8a4a6c1ad2ba6b349246268133c3aa29b3de4c42.

Own/lower PR states, refs, locks, auto-merge/merge-queue absence, and empty filtered native-stack membership were revalidated before publication and retargeting and verified afterward. The original PR number and branch are preserved; lower refs were not mutated. Live main at 0fa879ecf7c51946fa17e73304e468558c351b6c, including GitHub's refresh of the old main-based PR metadata, was recorded separately and not imported or used as a rebase target.

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 operations, real workspace mutations, real OBO/service-principal/managed-identity authorization, and recorded playback: not exercised. All update API requests use substituted HTTP and credentials. No live/recorded infrastructure, deployment, or real-service validation was added; handler/startup tests do not establish live permissions or playback.
  • Full-repository suites, package/NPX verification, and native publish were not run. The fresh prompt-validator publication is trimmed/self-contained, not native AOT. No PowerShell, project, or package files change relative to the immediate parent.
  • Hosted CI is not all green. The new-head snapshot showed successful CLA, SpellCheck, Verify Links, policy automation, and SDL agentless-tag checks. Azure build 6920075 had cancelled Initialize and SDL Sources Analysis stages while the aggregate mcp - pullrequest check remained queued. No CI retry or live pipeline was requested. Actual required CI and human review remain applicable.
  • This remains a draft. No auto-merge, merge-queue entry, merge, PR closure, replacement PR, or native-stack registration was introduced.

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-update-workspace branch from 8a4a6c1 to 946865b Compare October 5, 2026 23:20
@AmosHersch
Amos Hersch (AmosHersch) changed the base branch from main to amoshersch-fabric-create-workspace October 5, 2026 23:22
@AmosHersch
Amos Hersch (AmosHersch) force-pushed the amoshersch-fabric-update-workspace branch 2 times, most recently from 0730746 to 30cf162 Compare October 6, 2026 12:28
@AmosHersch
Amos Hersch (AmosHersch) force-pushed the amoshersch-fabric-update-workspace branch 2 times, most recently from 01bc8db to f946ea5 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

🔵 Needs a closer look

Supplied evidence leaves required CI incomplete and real Fabric mutation and authorization unvalidated, requiring human review.

Review effort: Balanced
Findings: None

What changed in this PR

Adds core_update-workspace to Fabric Core, building on the Create Workspace layer to support partial workspace metadata updates.

Changes:

  • Adds validated name/description updates through a single application-level PATCH.
  • Registers typed output, mutation safeguards, and sanitized error handling.
  • Adds offline coverage, discovery assertions, documentation, prompts, and a changelog entry.
File Description
tools/​Fabric.Mcp.Tools.Core/​tests/​Fabric.Mcp.Tools.Core.Tests/​WorkspaceUpdateToolRegistrationTests.cs Tests schemas, consent, output, and read-only enforcement.
tools/​Fabric.Mcp.Tools.Core/​tests/​Fabric.Mcp.Tools.Core.Tests/​WorkspaceCreateToolRegistrationTests.cs Extends cumulative discovery expectations.
tools/​Fabric.Mcp.Tools.Core/​tests/​Fabric.Mcp.Tools.Core.Tests/​TestSupport/​WorkspaceUpdateTestData.cs Supplies update fixtures and credentials.
tools/​Fabric.Mcp.Tools.Core/​tests/​Fabric.Mcp.Tools.Core.Tests/​TestSupport/​WorkspaceUpdateCancellationContent.cs Supports cancellation and disposal assertions.
tools/​Fabric.Mcp.Tools.Core/​tests/​Fabric.Mcp.Tools.Core.Tests/​Services/​FabricCoreServiceWorkspaceUpdateTests.cs Tests PATCH behavior, failures, and isolation.
tools/​Fabric.Mcp.Tools.Core/​tests/​Fabric.Mcp.Tools.Core.Tests/​README.md Documents coverage and validation boundaries.
tools/​Fabric.Mcp.Tools.Core/​tests/​Fabric.Mcp.Tools.Core.Tests/​Models/​WorkspaceUpdateSerializationTests.cs Tests field omission and restricted output.
tools/​Fabric.Mcp.Tools.Core/​tests/​Fabric.Mcp.Tools.Core.Tests/​FabricCoreSetupTests.cs Verifies update command registration.
tools/​Fabric.Mcp.Tools.Core/​tests/​Fabric.Mcp.Tools.Core.Tests/​Commands/​WorkspaceUpdateCommandTests.cs Tests validation, metadata, and sanitized failures.
tools/​Fabric.Mcp.Tools.Core/​src/​Validation/​WorkspaceUpdateInputValidator.cs Validates identifiers and supplied fields.
tools/​Fabric.Mcp.Tools.Core/​src/​Services/​WorkspaceUpdateThrottledException.cs Provides validated retry guidance.
tools/​Fabric.Mcp.Tools.Core/​src/​Services/​IFabricCoreService.cs Declares the update service contract.
tools/​Fabric.Mcp.Tools.Core/​src/​Services/​FabricCoreService.cs Implements PATCH and response validation.
tools/​Fabric.Mcp.Tools.Core/​src/​Options/​WorkspaceUpdateOptions.cs Defines partial-update inputs.
tools/​Fabric.Mcp.Tools.Core/​src/​Models/​WorkspaceUpdateResponse.cs Limits returned workspace metadata.
tools/​Fabric.Mcp.Tools.Core/​src/​Models/​WorkspaceUpdateCommandResult.cs Defines the typed result wrapper.
tools/​Fabric.Mcp.Tools.Core/​src/​Models/​UpdateWorkspaceRequest.cs Represents optional update properties.
tools/​Fabric.Mcp.Tools.Core/​src/​Models/​CoreJsonContext.cs Registers source-generated serialization.
tools/​Fabric.Mcp.Tools.Core/​src/​FabricCoreSetup.cs Registers and describes the new command.
tools/​Fabric.Mcp.Tools.Core/​src/​Commands/​WorkspaceUpdateCommand.cs Implements command execution and error handling.
servers/​Fabric.Mcp.Server/​tests/​Fabric.Mcp.Server.Tests/​Infrastructure/​ServerStartupTests.cs Extends host discovery and annotation checks.
servers/​Fabric.Mcp.Server/​README.md Documents update usage and limitations.
servers/​Fabric.Mcp.Server/​docs/​e2eTestPrompts.md Adds four update-selection prompts.
servers/​Fabric.Mcp.Server/​changelog-entries/​amoshersch-fabric-core-update-workspace.yaml Records the new feature.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@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