Repository navigation
Fixed nested value envelope in MCP stored procedure responses - #3868
Vaishali123t wants to merge 3 commits into
Conversation
Unwrap DAB’s { "value": [...] } response in built-in and custom MCP tools, and add regression tests for both paths.
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
There was a problem hiding this comment.
🟢 Approval recommended
The focused fix covers both execution paths with regression tests and no blocking issues identified; tests were not executed.
No open issues 🎉
What changed in this PR
Fixes nested value envelopes in DAB’s built-in and custom MCP stored procedure responses.
Changes:
- Centralizes envelope unwrapping and array normalization.
- Applies the shared helper to both execution paths.
- Adds regression tests and tightens SQL Server integration assertions.
| File | Description |
|---|---|
| src/Service.Tests/Mcp/ExecuteEntityToolTests.cs | Tests built-in envelope unwrapping. |
| src/Service.Tests/Mcp/ExecuteEntityToolMsSqlIntegrationTests.cs | Requires a direct result array. |
| src/Service.Tests/Mcp/DynamicCustomToolTests.cs | Tests custom-tool envelope unwrapping. |
| src/Service.Tests/Mcp/DynamicCustomToolMsSqlIntegrationTests.cs | Requires a direct result array. |
| src/Azure.DataApiBuilder.Mcp/Utils/McpResponseBuilder.cs | Adds shared result normalization. |
| src/Azure.DataApiBuilder.Mcp/Core/DynamicCustomTool.cs | Uses shared normalization. |
| src/Azure.DataApiBuilder.Mcp/BuiltInTools/ExecuteEntityTool.cs | Uses shared normalization. |
Review effort: Balanced
|
@microsoft-github-policy-service-agree |
|
Vaishali123t please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
Unwrap DAB’s { "value": [...] } response in built-in and custom MCP tools, and add regression tests for both paths.
Why make this change?
What is this change?
{
"entity": "GetBook",
"value": {
"value": [{ "id": 1 }]
},
"status": "success"
}
After:
{
"entity": "GetBook",
"value": [{ "id": 1 }],
"status": "success"
}
How was this tested?
Sample Request(s)