Repository navigation
feat(fabric): add read-only core_get-capacity tool - #3846
Merged
Merged
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
5 of 21 tasks
Amos Hersch (AmosHersch)
force-pushed
the
amoshersch-fabric-get-capacity
branch
from
October 5, 2026 21:02
9643019 to
3fe213e
Compare
Amos Hersch (AmosHersch)
changed the base branch from
main
to
amoshersch-shared-fabric-foundation
October 5, 2026 21:03
This was referenced Oct 5, 2026
Amos Hersch (AmosHersch)
force-pushed
the
amoshersch-fabric-get-capacity
branch
from
October 6, 2026 08:34
3fe213e to
8706aaa
Compare
Amos Hersch (AmosHersch)
force-pushed
the
amoshersch-fabric-get-capacity
branch
from
October 6, 2026 12:28
8706aaa to
286a0dd
Compare
Amos Hersch (AmosHersch)
marked this pull request as ready for review
October 6, 2026 12:29
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Prompt interactions are malformed and required ToolDescriptionEvaluator evidence remains pending.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Adds the read-only Fabric Core core_get-capacity tool with typed responses, validation, documentation, and offline tests.
Changes:
- Implements and registers capacity retrieval.
- Adds comprehensive command, service, and MCP tests.
- Updates prompts, documentation, and changelog.
| File | Description |
|---|---|
.../TestSupport/CapacityGetTestData.cs |
Adds shared test fixtures. |
.../Services/CapacityGetServiceTests.cs |
Tests HTTP and response handling. |
.../tests/.../README.md |
Documents test coverage. |
.../FabricCoreSetupTests.cs |
Verifies registration. |
.../Commands/CapacityGetCommandTests.cs |
Tests command behavior. |
.../CapacityGetMcpTests.cs |
Tests registered MCP behavior. |
.../Services/IFabricCoreService.cs |
Adds service contract. |
.../Services/FabricCoreService.cs |
Implements capacity retrieval. |
.../Services/FabricCapacityGetThrottledException.cs |
Adds throttling guidance. |
.../Options/CapacityGetOptions.cs |
Defines capacity ID input. |
.../Models/CoreJsonContext.cs |
Registers result serialization. |
.../Models/CapacityGetCommandResult.cs |
Defines typed result. |
.../FabricCoreSetup.cs |
Registers and exposes command. |
.../Commands/CapacityGetCommand.cs |
Implements the MCP command. |
servers/Fabric.Mcp.Server/README.md |
Documents operational tools and usage. |
servers/Fabric.Mcp.Server/docs/e2eTestPrompts.md |
Adds selection prompts. |
.../changelog-entries/amoshersch-fabric-core-get-capacity.yaml |
Records the feature. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Amos Hersch (AmosHersch)
force-pushed
the
amoshersch-fabric-get-capacity
branch
from
October 7, 2026 07:52
add904c to
01da3d0
Compare
KupoCat
approved these changes
Oct 7, 2026
This was referenced Oct 7, 2026
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?
Adds one read-only Fabric Core tool,
core_get-capacity, as the first tool layer above the shared foundation #3855. The immediate base isamoshersch-shared-fabric-foundationat21655d0f8af45619013675656caf4a179329e261; the ultimate base ismain. The foundation also includes the tool-catalog stream fix from #3854. This preserves the existing PR number and adds no other sibling tool.GET https://api.fabric.microsoft.com/v1/capacities/{capacityId}.capacity-id(--capacity-idin the CLI), validates a nonempty UUID before authentication/network access, and canonicalizes the request ID.{ capacity: { id, displayName, sku, region, state } }output. All five fields are required; SKU, region, and state accept future string values. Invalid, incomplete, or mismatched responses are rejected rather than turned into empty success.SendFabricHttpRequestAsyncwith explicitResponseHeadersReadand named cancellation,FabricCoreHttpHelpers.GetRetryAfter, sharedFabricCapacityMetadata.IsValid, andFabricCoreHttpMessageHandler. There is no duplicate capacity DTO/context registration or operation-specific HTTP test-handler copy.FabricCapacityGetThrottledExceptionguidance without retries, cancellation, and response/stream disposal.core_create-item,core_get-capacity, andcore_search-catalog.Validation
Re-run against the combined branch at
3fe213e152d26da952e28160f7bbfdfbd0390dd7:dotnet build tools\Fabric.Mcp.Tools.Core\src --nologo --verbosity quietdotnet build tools\Fabric.Mcp.Tools.Core\tests\Fabric.Mcp.Tools.Core.Tests --nologo --verbosity quietdotnet test --project tools\Fabric.Mcp.Tools.Core\tests\Fabric.Mcp.Tools.Core.Tests\Fabric.Mcp.Tools.Core.Tests.csproj --no-build --no-restoredotnet build servers\Fabric.Mcp.Server\src --nologo --verbosity quiet.\servers\Fabric.Mcp.Server\src\bin\Debug\fabmcp.exe tools list --name-onlyInvoke-Pester -Path .\eng\scripts\Test-ToolSelectionPrompts.Tests.ps1 -PassThru -Output Detailed.\eng\scripts\New-BuildInfo.ps1 -ServerName Fabric.Mcp.Server -PublishTarget none -BuildId 12345dotnet build servers\Fabric.Mcp.Server\src --no-restore --nologo --verbosity quiet --output .\.work\capacity-stack-catalog\Fabric.Mcp.Server\windows-x64.\eng\scripts\Test-ToolSelectionPrompts.ps1 -ServerName Fabric.Mcp.Server -SkipServerBuild -OutputPath .\.work\capacity-stack-catalog.\eng\scripts\Process-PackageReadMe.ps1 -Command validate -InputReadMePath .\servers\Fabric.Mcp.Server\README.mdgit diff --check 21655d0f8af45619013675656caf4a179329e261 HEADFormatting passed for the 13 C# files changed by this layer:
Spelling passed for all 17 layer files, with 0 issues:
The previously generated, schema-validated Get Capacity changelog entry is unchanged. Exact comparisons also confirm that the foundation's shared helpers, DTO, tests, and inherited catalog-stream fix are unchanged by this layer.
Coverage boundaries and pending validation
Offline coverage includes invalid and unexpected arguments before authentication, exact request URI/headers/scope, all required response fields, future string values, unknown-property exclusion, malformed responses, status preservation, safe retry guidance, cancellation/disposal, per-request credentials, and create/search regressions. Registered handlers exercise read-only discovery and default/compact/duplicated output; HTTP runtime configuration does not constitute a real HTTP/OBO test.
Live Fabric calls, real OBO authorization, service-principal/managed-identity access, and recorded playback are unexercised. Live/recorded infrastructure is outside this scoped change. ToolDescriptionEvaluator was not run. The Fabric MCP maintainer waived the score/ranking requirement for this PR in this review reply; no score or top-three ranking is claimed. Broad package/native suites were not run. The shared prompt validator and its stream-regression tests now pass locally on the inherited fix; this does not claim hosted CI success. Normal required CI and maintainer review still apply.
GitHub issue number?
No tracking issue was provided; none was created.
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 prompts — Not run; waived for this PR by the Fabric MCP maintainer (see review reply above).consolidated-tools.jsonbreaking-changelabelservers/Azure.Mcp.Server/docs/azmcp-commands.md./eng/scripts/Update-AzCommandsMetadata.ps1to update tool metadata inservers/Azure.Mcp.Server/docs/azmcp-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 PipelineThe rename and Azure-only items are not applicable. Fabric uses
NullConsolidatedToolDefinitionProvider, so this PR does not modify Azure's consolidated inventory. ToolDescriptionEvaluator was not run; its score/ranking requirement is waived for this PR as documented above. Required CI and normal review remain applicable.Invoking Livetests
Copilot submitted PRs are not trustworthy by default. Users with
writeaccess 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.