lbb_commit
Commit graph facts and properties, retract incorrect facts or whole records with approval, and store search relevance labels for ranked results.
Instructions
Write graph facts, retract them, or label ranked results. Explicit mode=records forwards a strict records/1 body, with exact IRIs/terms and the original receipt. It requires an existing support-enabled graph; protocol recognition never activates or converts a graph. Record edits that may remove support (set/unset/remove/delete/replace_scope or asserted=false) ask for approval. mode=facts writes triplets/embeddings/properties; mode=retract removes a wrongly-added fact (by edge or by entity) without a full reset, and removes whole records with purge_entity_properties; mode=search_feedback stores query/result relevance labels (Feedback grades: 3=ideal/good, 1=partial, 0=bad; include query, search_id when available, target, rank, score). Explicit idempotency_key wins; when omitted, MCP derives a stable content hash so content-identical retries dedupe. Facts mode defaults edge_idempotency to append; pass skip_unchanged for re-runnable backfills. Facts mode adds facts on every graph. On a graph that stores RDF (every new graph) it also replaces the other values of a field it sets, the label of a record it names and the target of a relation that keeps one target (whoever wrote them), and a link written twice is one statement; history stays readable. There, a link with confidence or valid time needs evidence (they are stored on it), observed_at needs evidence on each link, and entity_embeddings and preconditions are refused with the reason. On a graph that stores RDF, retract_entities needs purge_entity_properties, because a record there has no state of links only; it loses all its statements, and a record left with no link and no field because of it loses its type and label too. retract_edges works on every graph. A retract asks the person to approve the links and records it removes first. The server asks the person to approve it through the client (MCP form elicitation) and sends nothing when they decline (approval_declined). A client that cannot show the question gets approval_required and nothing is sent, unless the MCP server's environment sets LBB_MCP_DESTRUCTIVE=allow.
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": "lbb_commit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| graph | No | Graph to target; defaults to the connection's graph | |
| dry_run | No | Validate a facts commit and return its structured SHACL report without writing. Only supported for mode=facts. | |
| records | No | Explicit mode=records only: the unchanged RecordCommitRequest object with version=records/1. Unknown fields are preserved for strict server validation; no native IRI normalization or scalar coercion. Cannot mix legacy write arguments. | |
| triplets | No | ||
| observed_at | No | Backfill timestamp (RFC3339). Records this commit AS OF that instant: stamps transaction time and defaults each triplet's valid_time.start. Replay history in order with observed_at per commit so as-of reads by date work. Omit for live writes. | |
| retract_edges | No | mode=retract: specific edges to remove, matched by (source, relation, target). | |
| idempotency_key | No | ||
| search_feedback | No | ||
| edge_idempotency | No | Defaults to append in MCP. Use skip_unchanged for backfills; it skips exact current-edge duplicates and drops evidence-only repeats. | |
| retract_entities | No | mode=retract: entities whose every current edge is removed (a current-state tombstone; the record and its history are kept for as_of reads). With purge_entity_properties the record's field values go too. | |
| entity_embeddings | No | ||
| entity_properties | No | Typed scalar attributes per entity. Each item is { type, name, properties }. `properties` is a flat map of field -> value, e.g. { "type": "PERSON", "name": "Ada Lovelace", "properties": { "h_index": 52, "title": "VP", "last_contact": "2026-06-26" } }. Values are coerced to each field's declared type, so a string like "2026-06-26" lands in a date_time field and "52" in an i64 field. (The verbose form [{ field, value: { i64: 52 } }] is also accepted.) Register a field first with lbb_configure evolve_ontology add_property; the commit response echoes written_properties so you can confirm what landed. | |
| expected_graph_epoch | No | mode=records only: exact decimal graph incarnation guard. Protocol support does not activate this graph. | |
| purge_entity_properties | No | mode=retract: also clear the field values of retract_entities, so each record leaves the current graph whole (its history stays readable with as_of reads). Required for retract_entities on a graph that stores RDF, where retracting a record removes all of its statements: links, field values, type and label. |