set_row_rule
Admin only. Decide which ROWS of a table a role may see or change. modes: all | own (rows where the person is in one of owner_columns, e.g. owner_id, created_by) | assigned (rows the person is linked to via set_record_members) | assigned_via (the person is linked to the PARENT record: field = the reference column, parent_resource = the parent table, e.g. lab orders via project_id to mod_asbest_projects) | field_equals (row field = a field of the person's profile) | none. Several rules for one role are OR-ed. A table with rules but none for a given role leaves that role unrestricted. applies_to: read | write | all. Pass rule_id + remove=true to delete a rule. Read 'scope' before relying on it.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "set_row_rule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Which rows the role may see or change | |
| note | No | Why — shows up in list_row_rules. | |
| role | No | '*' = every role (except superadmin). | |
| field | No | For field_equals: column of the table. For assigned_via: the reference column (e.g. project_id). | |
| remove | No | true with rule_id deletes the rule | |
| rule_id | No | ID of the rule | |
| resource | No | Table the row rule applies to | |
| applies_to | No | read | create | update | delete, or write (= create+update+delete), or all. | |
| owner_columns | No | For mode own, e.g. ["owner_id","created_by"]. | |
| profile_field | No | For mode field_equals. | |
| parent_resource | No | For assigned_via: the parent table whose assignments count. |