Insert or upsert knowledge records
add_recordsInsert or upsert structured fact records into an existing knowledge entity with source provenance and evidence. Validates batches atomically, normalizes values, and returns inserted, updated, and skipped ids.
Instructions
Insert or upsert structured records into an existing knowledge entity with source provenance, locators, and supporting quotes. Use after define_entity for countable facts; use edit_records to update or delete existing rows by id, save_concept for prose explanations, and save_passages for searchable document excerpts. Validates the entire batch atomically (normalizing currency/dates and resolving refs) so any invalid record aborts the write and returns all errors. Returns inserted, updated, and skipped ids.
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": {
"entity": "<entity>",
"records": "<records>"
},
"name": "add_records"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity | Yes | Existing knowledge entity (Term) name, e.g. 'Receipt'. | |
| source | No | Where this came from: an existing source id, or a new source to register (deduplicated by uri or title). | |
| records | Yes | List of record objects mapping column names to values. Strings like '12,000원' or '2026/10/03' are normalized; ref columns accept an id, name (auto-created when create_missing_refs=true), or object. Optional per record: id (update row), _locator, _evidence, _note, _source. | |
| on_conflict | No | Conflict policy when a record matches an existing row by natural keys or identical values: 'update', 'skip', or 'error'. | update |
| create_missing_refs | No | Set true to auto-create referenced entity rows (e.g. a new merchant or author) by name. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||