Repository navigation
feat(fabric): add read-only core_list-capacities tool - #3852
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-list-capacities
branch
from
October 5, 2026 21:33
dcc06ab to
3e9acea
Compare
Amos Hersch (AmosHersch)
changed the base branch from
main
to
amoshersch-fabric-get-capacity
October 5, 2026 21:40
This was referenced Oct 5, 2026
Amos Hersch (AmosHersch)
force-pushed
the
amoshersch-fabric-list-capacities
branch
2 times, most recently
from
October 6, 2026 12:28
bdbb08d to
589127e
Compare
Amos Hersch (AmosHersch)
force-pushed
the
amoshersch-fabric-list-capacities
branch
from
October 7, 2026 08:04
589127e to
2d4c46b
Compare
Co-authored-by: Copilot App <[email protected]>
Amos Hersch (AmosHersch)
force-pushed
the
amoshersch-fabric-list-capacities
branch
from
October 7, 2026 11:49
2d4c46b to
470a840
Compare
Amos Hersch (AmosHersch)
marked this pull request as ready for review
October 7, 2026 12:48
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The new Interaction values are parsed into evaluation prompts, altering the requests being tested.
Review effort: Balanced
Findings: 1
What changed in this PR
Adds read-only core_list-capacities above the existing Get Capacity tool, reusing shared Fabric HTTP and capacity infrastructure.
Changes:
- Returns one typed page with optional continuation information.
- Adds command registration, serialization, and sanitized error handling.
- Adds offline tests, documentation, selection prompts, and a changelog entry.
| File | Description |
|---|---|
| tools/Fabric.Mcp.Tools.Core/tests/Fabric.Mcp.Tools.Core.Tests/TestSupport/CapacityListTestData.cs | Shared test fixtures. |
| tools/Fabric.Mcp.Tools.Core/tests/Fabric.Mcp.Tools.Core.Tests/TestSupport/CapacityListCancellationStream.cs | Cancellation test stream. |
| tools/Fabric.Mcp.Tools.Core/tests/Fabric.Mcp.Tools.Core.Tests/Services/FabricCoreServiceCapacityListTests.cs | HTTP and pagination coverage. |
| tools/Fabric.Mcp.Tools.Core/tests/Fabric.Mcp.Tools.Core.Tests/README.md | Coverage and execution guidance. |
| tools/Fabric.Mcp.Tools.Core/tests/Fabric.Mcp.Tools.Core.Tests/Models/CapacityListSerializationTests.cs | Typed output serialization tests. |
| tools/Fabric.Mcp.Tools.Core/tests/Fabric.Mcp.Tools.Core.Tests/FabricCoreSetupTests.cs | Registration assertions. |
| tools/Fabric.Mcp.Tools.Core/tests/Fabric.Mcp.Tools.Core.Tests/Commands/CapacityListCommandTests.cs | Command contract tests. |
| tools/Fabric.Mcp.Tools.Core/tests/Fabric.Mcp.Tools.Core.Tests/CapacityListToolRegistrationTests.cs | MCP schema and output tests. |
| tools/Fabric.Mcp.Tools.Core/src/Services/IFabricCoreService.cs | Listing service contract. |
| tools/Fabric.Mcp.Tools.Core/src/Services/FabricCoreService.cs | Single-page HTTP implementation. |
| tools/Fabric.Mcp.Tools.Core/src/Services/CapacityListThrottledException.cs | Validated retry guidance. |
| tools/Fabric.Mcp.Tools.Core/src/Options/CapacityListOptions.cs | Optional continuation token. |
| tools/Fabric.Mcp.Tools.Core/src/Models/CoreJsonContext.cs | Source-generated serialization registrations. |
| tools/Fabric.Mcp.Tools.Core/src/Models/CapacityListResponse.cs | API page model. |
| tools/Fabric.Mcp.Tools.Core/src/Models/CapacityListCommandResult.cs | Tool output model. |
| tools/Fabric.Mcp.Tools.Core/src/FabricCoreSetup.cs | Tool registration and discovery. |
| tools/Fabric.Mcp.Tools.Core/src/Commands/CapacityListCommand.cs | Read-only command implementation. |
| servers/Fabric.Mcp.Server/README.md | Usage and permissions guidance. |
| servers/Fabric.Mcp.Server/docs/e2eTestPrompts.md | Tool-selection prompts. |
| servers/Fabric.Mcp.Server/changelog-entries/amoshersch-fabric-core-list-capacities.yaml | Feature release entry. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
KupoCat
reviewed
Oct 8, 2026
KupoCat
approved these changes
Oct 8, 2026
8 of 21 tasks
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 exactly one read-only Fabric Core tool,
core_list-capacities(fabmcp core list-capacities), as the next layer above Get Capacity #3846. The immediate base isamoshersch-fabric-get-capacityat3fe213e152d26da952e28160f7bbfdfbd0390dd7; the ultimate base ismain. The existing PR number and branch are preserved.This layer is one commit,
3e9acea71343da9f78a789d9aa3c3ca5bd52c9bc, with 20 changed files relative to Get Capacity. The shared foundation from #3855, its inherited catalog-stream fix from #3854, and Get Capacity implementation/tests are retained unchanged.capacitiespluscontinuationTokenandcontinuationUriwhen supplied. Capacity entries expose ID, display name, SKU, region, and state; future string values remain supported.SendFabricHttpRequestAsyncwith explicitResponseHeadersReadand named cancellation,FabricCoreHttpHelpers.EncodeContinuationToken,FabricCoreHttpHelpers.GetRetryAfter, sharedFabricCapacityMetadata.IsValid, andFabricCoreHttpMessageHandler. There is no duplicate encoder, capacity DTO/context entry, authenticated-send implementation, or list-specific counting-handler copy.%3D. Raw delimiters, invalid percent sequences, and literal+are safely encoded. Normal URI canonicalization stays enabled (%41%7e%2D%5f%2EbecomesA~-_.on the wire); returned continuation strings remain unchanged. No Base64 decoding or returned-URI following.CapacityListThrottledException, cancellation, and disposal behavior. Exact file comparisons against the original recovery snapshot confirm the command/options/result/page/exception contract is unchanged.IAzureTokenCredentialProvider, DataFactory'sProviderDelegatingCredential, and injectedTokenCredential. Existing create/search behavior and inherited Get Capacity/foundation tests remain intact.core_create-item,core_get-capacity,core_list-capacities, andcore_search-catalog.No ARM subscription parameters, invented page size, fetch-all, automatic retries, mutations, LROs, authentication redesign, project/dependency changes, or new engineering changes. No lower refs or native stack metadata were changed.
Cumulative local validation
Re-run on the combined branch at
3e9acea71343da9f78a789d9aa3c3ca5bd52c9bcusing the repository's .NET SDK 10.0.401 configuration. 370 focused tests passed, zero failed/skipped: 365 Core tests, 3 existing Fabric startup/discovery tests, and 2 existing credential-delegation tests.dotnet build tools\Fabric.Mcp.Tools.Core\src\Fabric.Mcp.Tools.Core.csproj --no-restore --nologo --verbosity quietdotnet build tools\Fabric.Mcp.Tools.Core\tests\Fabric.Mcp.Tools.Core.Tests\Fabric.Mcp.Tools.Core.Tests.csproj --no-restore --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-restore --no-progressdotnet build servers\Fabric.Mcp.Server\tests\Fabric.Mcp.Server.Tests\Fabric.Mcp.Server.Tests.csproj --no-restore --nologo --verbosity quietdotnet test --project servers\Fabric.Mcp.Server\tests\Fabric.Mcp.Server.Tests\Fabric.Mcp.Server.Tests.csproj --no-build --no-restore --filter-class '*ServerStartupTests' --no-progressdotnet 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.\servers\Fabric.Mcp.Server\src\bin\Debug\fabmcp.exe tools list --name-only.\servers\Fabric.Mcp.Server\src\bin\Debug\fabmcp.exe core list-capacities --help.\eng\scripts\New-BuildInfo.ps1 -ServerName Fabric.Mcp.Server -PublishTarget none -BuildId 12345dotnet build servers\Fabric.Mcp.Server\src\Fabric.Mcp.Server.csproj --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.md.\eng\scripts\Compile-Changelog.ps1 -ChangelogPath servers\Fabric.Mcp.Server\CHANGELOG.md -DryRungit diff --check 3fe213e152d26da952e28160f7bbfdfbd0390dd7 HEADFormatting passed for all 16 layer C# files (9 source, 7 test):
Spelling passed for all 20 layer files, with 0 issues:
$cachewas an isolated session-local tooling directory, removed by the spelling script. Temporary validator artifacts and the generated build metadata were also removed after validation. Exact comparisons confirmed that inherited engineering files, shared capacity/HTTP foundations, and Get Capacity implementation/tests were not changed by this layer.List coverage retains documented token/URI pairs, first/continuation/final/empty pages, independent continuation fields, reserved/raw/invalid percent sequences, normal unreserved normalization, literal plus, Unicode, injection attempts, one HTTP send per valid invocation, forward-compatible metadata, malformed payload rejection, safe status/Retry-After behavior, cancellation/disposal, concurrent credential isolation, and legacy/compact/duplicated MCP output.
Explicit coverage limits
GitHub issue number?
No tracking issue was supplied or created for this directly requested tool and its authorized conflict-prevention reorganization.
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; score/ranking requirement waived for this PR by the Fabric MCP maintainer.consolidated-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 PipelineAzure-only command/consolidation steps and the rename checklist are not applicable: this adds one Fabric tool above its declared parent, no existing tool is renamed, and Fabric uses
NullConsolidatedToolDefinitionProvider. Fabric-specific prompts are composed with the parent's prompts. No live-test pipeline was invoked.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.