Check write rules
check_write_rulesCompile a list's write rules with the same engine the API uses, and run their tests (a rules-tests-v1 document). Returns every diagnostic with its line and column, and for each failing test what it expected, what happened, and how each rule came out. Costs nothing and sees no data: lookups find the test document's items. Use it before saving rules.
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": {
"rules": "<rules>"
},
"name": "check_write_rules"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rules | Yes | The rule text, or its lines as an array (as in a schema sync document) | |
| tests | No | The rule tests: a rules-tests-v1 document ({ "tests": [...] }), optional | |
| knownLists | No | Path names of lists that exist, so lookups into any other list are warned about, as the API does when rules are saved |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| diagnostics | Yes |