Propose per-record rules for a Data Space
propose_rulesPropose the end-user access rules of a Data Space (the shape of InstantDB's instant.perms.ts, expressions in CEL): per table bind and allow with view/create/update/delete, plus _users (view), _files and _rooms (join). Nothing changes until a space owner approves the proposal in the Kovlet console (Schema proposals), as with POST /v1/spaces/{space}/rules/proposals. The document replaces the current rules as a whole: start from the rules that inspect_space_schema returns. Rules bind end users only; members, apps' own sessions and Machine Auth Keys keep their space roles. Closed by default: a table with no view rule is invisible to end users. Guide: /docs/rules.md
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": {
"space": "<space>",
"rules": "<rules>"
},
"name": "propose_rules"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rules | Yes | The whole rules document, e.g. {"todos": {"bind": ["isOwner", "auth.id == data.owner"], "allow": {"view": "isOwner", "create": "auth.id == newData.owner", "update": "isOwner", "delete": "isOwner"}}}. Expressions read auth.id/auth.email/auth.is_guest, data (the stored row), newData (the row after a write), params, and data.ref('link.column'). "$default" applies to app tables without an entry. | |
| space | Yes | The Data Space: its id (from list_spaces), slug or exact name. |