-
Notifications
You must be signed in to change notification settings - Fork 286
Expand ALL permissions in MCP describe_entities to explicit operations #2951
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
Conversation
Co-authored-by: JerryNixon <[email protected]>
…tency Co-authored-by: JerryNixon <[email protected]>
… copilot/fix-describe-entities-permissions
…ithub.com/Azure/data-api-builder into copilot/fix-describe-entities-permissions
… copilot/fix-describe-entities-permissions
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 enhances the BuildPermissionsInfo method in DescribeEntitiesTool to properly expand the EntityActionOperation.All wildcard permission into its constituent operations based on entity type.
Key changes:
- Added early return for null permissions
- Implemented entity-type-aware expansion of the "All" wildcard operation (EXECUTE for stored procedures, CREATE/READ/UPDATE/DELETE for regular entities)
- Switched to case-insensitive string comparison for the permissions HashSet to avoid duplicates
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
The MCP
describe_entitiestool returns"ALL"for wildcard permissions, which confuses LLM consumers that need explicit operation lists.Changes
Modified
DescribeEntitiesTool.BuildPermissionsInfo()to expandEntityActionOperation.All:["CREATE", "DELETE", "READ", "UPDATE"]viaEntityAction.ValidPermissionOperations["EXECUTE"]viaEntityAction.ValidStoredProcedurePermissionOperationsExample
Before:
{ "name": "Todo", "permissions": ["ALL"] }After:
{ "name": "Todo", "permissions": ["CREATE", "DELETE", "READ", "UPDATE"] }Original prompt
describe_entitiespermissions valueALLneeds to be expanded. #2935