smart_set_permissions
Set DocType permissions with role validation and error handling, while optionally preserving existing permissions and reloading the DocType after changes.
Instructions
Set permissions for a DocType with enhanced validation and error handling
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"doctype": "<doctype>",
"perms": "<perms>"
},
"name": "smart_set_permissions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| perms | Yes | Permissions array | |
| doctype | Yes | DocType name | |
| reload_doctype | No | Reload DocType after setting permissions | |
| validate_roles | No | Validate that roles exist before setting permissions | |
| preserve_existing | No | Preserve existing permissions not in the provided array |