Added missing stored procedure parameters in describe_entities response.#3425
Added missing stored procedure parameters in describe_entities response.#3425anushakolan wants to merge 3 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates MCP describe_entities to reliably include complete stored procedure parameter metadata by augmenting/merging config-defined parameters with runtime database metadata, and adds targeted tests to validate the behavior.
Changes:
- Resolve stored procedure parameter metadata from runtime DB metadata when config parameters are missing/partial.
- Merge config + DB parameter metadata, preferring config values for overlapping fields.
- Add MCP unit tests covering metadata-only discovery and config-overrides-DB merging.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/Azure.DataApiBuilder.Mcp/BuiltInTools/DescribeEntitiesTool.cs | Adds metadata resolution for stored procedure entities and merges DB/config parameter metadata in describe_entities output. |
| src/Service.Tests/Mcp/DescribeEntitiesStoredProcedureParametersTests.cs | Adds unit tests validating parameter discovery from DB metadata and config-overrides behavior. |
Aniruddh25
left a comment
There was a problem hiding this comment.
Want to know reasoning behind why the bug happened.
|
Hey just wanted to let you know that it seems this PR is related to a bug that I created for 2.0. Might be a good idea to check it and see if it can be fixed on this PR or as a follow up. #3435 |
Thanks for linking these! They share the same root cause: parameter metadata is read only from config, not from runtime DB metadata. PR #3425 fixes Bug #3435 needs a follow-up PR to fix The fix requires passing |
Original implementation only read config ( |
Why make this change?
Closes #3400.
describe_entitiescould return stored procedure entities with empty or partialparametersmetadata when parameters were not fully listed in config. This caused MCP clients/agents to miss required inputs and failexecute_entitycalls.Additional discussion: #3400 issue thread.
What is this change?
DescribeEntitiesToolto include stored procedure parameters from runtime DB metadata.required,default,description).How was this tested?
Ran:
Sample Request(s)
MCP request example:
describe_entitieswith full metadata:{"name":"describe_entities","arguments":{}}execute_entityusing discovered parameters:{"name":"execute_entity","arguments":{"entity":"GetBook","parameters":{"id":1}}}