cfg_set
Edit live config records atomically by dotted path; append or remove array values and preview changes with dry run.
Instructions
Partial edit: set fields by dotted path, append to / remove from arrays. Computed from the current live doc atomically (no read needed; a concurrent write returns stale_base, just rerun). Drift-guarded and versioned. dry_run=true previews the delta and references.
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": {
"record": "<record>",
"assignments": "<assignments>",
"message": "<message>"
},
"name": "cfg_set"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Environment name from .cfg.toml (e.g. dev, prod). Selects the target database. | dev |
| author | No | Author attribution hint. Ignored/rejected in authenticated/enforced identity modes where a verified identity is required. | |
| record | Yes | Record address as collection:id, e.g. agent_configs:refund_resolution. | |
| dry_run | No | Preview the change and return the would-be result without writing anything. | |
| message | Yes | Why you are making this change (stored in history). | |
| assignments | Yes | Edits as a dotted-path→value map (e.g. {"enabled": true, "retry.max": 3}; preferred), a list of {field, value, op} objects (op: set | append | remove) or of "field=value" strings, or one "field=value other=value" string (each value is read as JSON when it parses, else as text). List edits in a map: {"orgs+=": "abc"} appends if absent, {"orgs-=": "abc"} removes every match; a list value applies to each element. Dates/decimals as Extended JSON ({"$date": ...}). | |
| config_file | No | Omit: the server uses the .cfg.toml it started with. A different path is refused unless the server runs with CFGIT_MCP_ALLOW_CONFIG_OVERRIDE=1. | |
| no_validate | No | Skip the collection validator for an emergency write (recorded in history). Off by default. | |
| allow_secret | No | Allow committing values that match secret-deny rules (logged). Off by default. | |
| allow_type_change | No | Allow replacing a live datetime/decimal/ObjectId with a different type, e.g. an ISO string (logged). Off by default; send dates as {"$date": ...} instead. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||