-
Notifications
You must be signed in to change notification settings - Fork 301
[MCP] Prevent duplicating entities between custom tools and describe_entities #3076
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR prevents stored-procedure entities that are already exposed as dedicated custom MCP tools from being duplicated in the describe_entities response.
Changes:
- Added filtering in
DescribeEntitiesToolto skip stored procedures withentity.Mcp.CustomToolEnabled == true. - Added new MSTest coverage validating stored procedure filtering and ensuring tables/views remain unaffected.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Azure.DataApiBuilder.Mcp/BuiltInTools/DescribeEntitiesTool.cs | Filters out custom-tool-enabled stored procedures from describe_entities results. |
| src/Service.Tests/Mcp/DescribeEntitiesFilteringTests.cs | Adds tests verifying filtering behavior across stored procedures, tables/views, and nameOnly mode. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/Azure.DataApiBuilder.Mcp/BuiltInTools/DescribeEntitiesTool.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/Azure.DataApiBuilder.Mcp/BuiltInTools/DescribeEntitiesTool.cs
Outdated
Show resolved
Hide resolved
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
Desired logic
|
Why make this change?
With custom tools, stored procedure entities could get listed in
describe_entitieseven when they are configured as custom-tool-only (withdml-tools: false). This creates duplication since they already appear intools/list. We need to filter stored procedures withdml-tools: falsefromdescribe_entitiesto avoid this duplication.What is this change?
dml-toolsis explicitly set to falsedescribe_entitiesonly when they are custom-tool-only (not available for DML operations)dml-tools: true(or null/default) continue to appear indescribe_entitieseven if they havecustom-tool: true, allowing dual exposure when neededHow was this tested?
Sample Request(s)