lbb_commit
Writes or retracts knowledge-graph facts and stores ranked search feedback, with approval for destructive edits and idempotent retries.
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; 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. 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.
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). | |
| 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. |