set_setting
Writes a single settings key at one layer using compare-and-set on expected_version, creating it with null or updating it with the stored version, with every outcome audited.
Instructions
Write one settings key at one layer, compare-and-set on expected_version.
expected_version is null to create a record and the stored version to
update it. allow_loosen replaces the layer's list of ceiling keys that the
layer below may loosen; null keeps the list already stored.
Returns {"ok": True, "scope", "scope_id", "repo", "key", "value", "new_version"} on success, or a refusal dict. Every outcome is audited.
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": {
"scope": "<scope>",
"scope_id": "<scope_id>",
"repo": "<repo>",
"key": "<key>",
"value": "<value>",
"expected_version": "<expected_version>"
},
"name": "set_setting"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| repo | Yes | ||
| scope | Yes | ||
| value | Yes | ||
| scope_id | Yes | ||
| allow_loosen | No | ||
| expected_version | Yes |