cfg_import
Starts tracking live records or restores documents from an export artifact through a drift-guarded bulk commit; use dry_run to preview changes without writing.
Instructions
Start tracking live records (record or all_records), or restore documents from a
cfg_export artifact via from_export (writes them back through the drift-guarded bulk-commit
path). dry_run=true previews either form (would_import / per-record delta) without writing.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "cfg_import"
}
}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 | No | 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 | No | Human-readable commit/operation message. | initial import |
| all_records | No | Import every configured collection instead of a single record. | |
| 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. | |
| from_export | No | A cfg_export artifact (dict or list) to restore documents from, via the drift-guarded bulk path. | |
| 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 | |||