-
Notifications
You must be signed in to change notification settings - Fork 285
Expand ALL permissions in MCP describe_entities to explicit operations #2938
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]>
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 expand the "ALL" wildcard permission into specific operations based on entity type. When an entity has the "ALL" permission, it now resolves to specific CRUD operations (Create, Read, Update, Delete) for regular entities or Execute for stored procedures, providing more explicit permission information to API consumers.
- Adds logic to detect and expand "ALL" (wildcard) permissions
- Differentiates between stored procedure entities (expand to Execute) and regular entities (expand to CRUD operations)
- Maintains the existing behavior for explicit permissions
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… copilot/fix-describe-entities-permissions
…ithub.com/Azure/data-api-builder into 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.
LGTM. Added a small optimization to get the valid permissions only once if entity is stored procedure.
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
|
This change is moved under a different PR- #2951 due to some issues with test pipeline. Once the new PR is approved and merged, this PR should be closed without merging. |
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.
Awaiting PR #2951 to be merged. This PR should not be merged.
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💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.