-
Notifications
You must be signed in to change notification settings - Fork 299
Open
Labels
Milestone
Description
Goal: Prevent duplication between custom tools and describe_entities
Files to Modify:
DescribeEntitiesTool.cs
Add filtering in entity loop (~line 150-160)
Skip entities where: entity.Source.Type == EntitySourceType.StoredProcedure && entity.Mcp?.CustomToolEnabled == true
Add XML comment explaining custom-tool exclusion
Code change:
foreach (KeyValuePair<string, Entity> entityEntry in runtimeConfig.Entities)
{
string entityName = entityEntry.Key;
Entity entity = entityEntry.Value;
// Skip stored procedures exposed as custom tools - they appear in tools/list instead
if (entity.Source.Type == EntitySourceType.StoredProcedure &&
entity.Mcp?.CustomToolEnabled == true)
{
continue;
}
if (!ShouldIncludeEntity(entityName, entityFilter))
{
continue;
}
// ... rest of loop
}
Files to Create:
2. src/Azure.DataApiBuilder.Mcp.Tests/DescribeEntitiesFilteringTests.cs
Custom-tool SPs excluded from describe_entities
Regular SPs (without custom-tool) still appear
Tables/views unaffected by filtering
Count validation (entities.count reflects filtered list)
nameOnly parameter works with filtering
Deliverable: Clean separation between custom tools and entity discovery
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Todo