cfg_add
Creates a new config record by inserting its live document and version 1 in one transaction, refusing duplicate IDs so existing records stay protected.
Instructions
Create a record: insert the live doc and record version 1 in one transaction. Refuses if a live doc with that id exists. A record removed with cfg_rm can be added again.
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>",
"doc_json": "<doc_json>",
"message": "<message>"
},
"name": "cfg_add"
}
}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. feature_flags:new_router. | |
| dry_run | No | Validate and return the would-be version without writing anything. | |
| message | Yes | Why you are creating this record (stored in history). | |
| doc_json | Yes | The new document (object or JSON string). The id field and live_when values are filled in. Dates/decimals as Extended JSON. | |
| 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||