Skip to main content
Glama
@littlebigbrain/mcp

@littlebigbrain/mcp

lbb_commit

DestructiveIdempotent

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

NameRequiredDescriptionDefault
modeNo
graphNoGraph to target; defaults to the connection's graph
dry_runNoValidate a facts commit and return its structured SHACL report without writing. Only supported for mode=facts.
recordsNoExplicit 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.
tripletsNo
observed_atNoBackfill 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_edgesNomode=retract: specific edges to remove, matched by (source, relation, target).
idempotency_keyNo
search_feedbackNo
edge_idempotencyNoDefaults to append in MCP. Use skip_unchanged for backfills; it skips exact current-edge duplicates and drops evidence-only repeats.
retract_entitiesNomode=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_embeddingsNo
entity_propertiesNoTyped 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_epochNomode=records only: exact decimal graph incarnation guard. Protocol support does not activate this graph.
purge_entity_propertiesNomode=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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.18.1
    • addedInput schema / properties / purge_entity_properties
      Added value: +{
      +  "description": "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.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / retract_entities / description
      Previous value: -"mode=retract: entities whose every current edge is removed (a current-state tombstone; the record and its history are kept for as_of reads)."New value: +"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."
  2. Changed3 schema fields changedv0.17.0
    • addedInput schema / properties / expected_graph_epoch
      Added value: +{
      +  "description": "mode=records only: exact decimal graph incarnation guard. Protocol support does not activate this graph.",
      +  "type": "string"
      +}
    • changedInput schema / properties / mode / enum
      Previous value: -[
      -  "facts",
      -  "retract",
      -  "search_feedback"
      -]New value: +[
      +  "facts",
      +  "retract",
      +  "search_feedback",
      +  "records"
      +]
    • addedInput schema / properties / records
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "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.",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
  3. Changed21 schema fields changedv0.16.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / entity_embeddings / items / properties
      Added value: +{
      +  "entity_id": {
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "key": {
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "metric": {
      +    "anyOf": [
      +      {
      +        "enum": [
      +          "cosine",
      +          "dot",
      +          "l2"
      +        ],
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ]
      +  },
      +  "model_id": {
      +    "type": "string"
      +  },
      +  "name": {
      +    "type": "string"
      +  },
      +  "type": {
      +    "type": "string"
      +  },
      +  "vector": {
      +    "items": {
      +      "type": "number"
      +    },
      +    "type": "array"
      +  }
      +}
    • addedInput schema / properties / entity_embeddings / items / required
      Added value: +[
      +  "type",
      +  "name",
      +  "model_id",
      +  "vector"
      +]
    • addedInput schema / properties / entity_properties / items / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • removedInput schema / properties / retract_edges / items / additionalProperties
      Removed value: -false
    • removedInput schema / properties / retract_edges / items / properties / source / additionalProperties
      Removed value: -false
    • removedInput schema / properties / retract_edges / items / properties / target / additionalProperties
      Removed value: -false
    • removedInput schema / properties / retract_entities / items / additionalProperties
      Removed value: -false
    • changedInput schema / properties / search_feedback / additionalProperties
      Previous value: -trueNew value: +{}
    • changedInput schema / properties / search_feedback / properties / labels / items / additionalProperties
      Previous value: -trueNew value: +{}
    • addedInput schema / properties / search_feedback / properties / labels / items / properties / rank / maximum
      Added value: +9007199254740991
    • removedInput schema / properties / search_feedback / properties / labels / items / properties / target / anyOf
      Removed value: -[
      -  {
      -    "additionalProperties": true,
      -    "properties": {
      -      "entity": {
      -        "additionalProperties": true,
      -        "properties": {
      -          "entity_id": {
      -            "description": "Entity id (hex), as an alternative to type+name",
      -            "type": "string"
      -          },
      -          "entity_type": {
      -            "description": "Entity type name (with `name`, names a fixed entity)",
      -            "type": "string"
      -          },
      -          "name": {
      -            "description": "Entity name (paired with `entity_type`)",
      -            "type": "string"
      -          }
      -        },
      -        "type": "object"
      -      },
      -      "kind": {
      -        "const": "entity",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "kind",
      -      "entity"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": true,
      -    "properties": {
      -      "edge_event_id": {
      -        "type": "string"
      -      },
      -      "kind": {
      -        "const": "assertion",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "kind",
      -      "edge_event_id"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": true,
      -    "properties": {
      -      "kind": {
      -        "const": "observation",
      -        "type": "string"
      -      },
      -      "observation_id": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "kind",
      -      "observation_id"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": true,
      -    "properties": {
      -      "concept_id": {
      -        "type": "string"
      -      },
      -      "kind": {
      -        "const": "concept",
      -        "type": "string"
      -      },
      -      "name": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "kind"
      -    ],
      -    "type": "object"
      -  }
      -]
    • addedInput schema / properties / search_feedback / properties / labels / items / properties / target / oneOf
      Added value: +[
      +  {
      +    "additionalProperties": {},
      +    "properties": {
      +      "entity": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "entity_id": {
      +            "description": "Entity id (hex), as an alternative to type+name",
      +            "type": "string"
      +          },
      +          "entity_type": {
      +            "description": "Entity type name (with `name`, names a fixed entity)",
      +            "type": "string"
      +          },
      +          "name": {
      +            "description": "Entity name (paired with `entity_type`)",
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "kind": {
      +        "const": "entity",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "entity"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": {},
      +    "properties": {
      +      "edge_event_id": {
      +        "type": "string"
      +      },
      +      "kind": {
      +        "const": "assertion",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "edge_event_id"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": {},
      +    "properties": {
      +      "kind": {
      +        "const": "observation",
      +        "type": "string"
      +      },
      +      "observation_id": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "observation_id"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": {},
      +    "properties": {
      +      "concept_id": {
      +        "type": "string"
      +      },
      +      "kind": {
      +        "const": "concept",
      +        "type": "string"
      +      },
      +      "name": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind"
      +    ],
      +    "type": "object"
      +  }
      +]
    • addedInput schema / properties / search_feedback / properties / profile / anyOf
      Added value: +[
      +  {
      +    "enum": [
      +      "baseline",
      +      "scored_atom_v1",
      +      "graph_aware_v1",
      +      "ndcg_v1"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / search_feedback / properties / profile / type
      Removed value: -"string"
    • addedInput schema / properties / search_feedback / properties / snapshot / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • removedInput schema / properties / triplets / items / additionalProperties
      Removed value: -false
    • addedInput schema / properties / triplets / items / properties / evidence / anyOf
      Added value: +[
      +  {
      +    "anyOf": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "additionalProperties": {},
      +        "properties": {
      +          "observation_id": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "region": {
      +            "anyOf": [
      +              {
      +                "additionalProperties": {},
      +                "properties": {
      +                  "confidence": {
      +                    "maximum": 1,
      +                    "minimum": 0,
      +                    "type": "number"
      +                  },
      +                  "page": {
      +                    "maximum": 9007199254740991,
      +                    "minimum": 0,
      +                    "type": "integer"
      +                  },
      +                  "x0": {
      +                    "maximum": 1,
      +                    "minimum": 0,
      +                    "type": "number"
      +                  },
      +                  "x1": {
      +                    "maximum": 1,
      +                    "minimum": 0,
      +                    "type": "number"
      +                  },
      +                  "y0": {
      +                    "maximum": 1,
      +                    "minimum": 0,
      +                    "type": "number"
      +                  },
      +                  "y1": {
      +                    "maximum": 1,
      +                    "minimum": 0,
      +                    "type": "number"
      +                  }
      +                },
      +                "required": [
      +                  "page",
      +                  "x0",
      +                  "y0",
      +                  "x1",
      +                  "y1",
      +                  "confidence"
      +                ],
      +                "type": "object"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "source_id": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "text": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "type": "object"
      +      }
      +    ]
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / triplets / items / properties / source / additionalProperties
      Removed value: -false
    • removedInput schema / properties / triplets / items / properties / target / additionalProperties
      Removed value: -false
    • removedInput schema / properties / triplets / items / properties / valid_time / additionalProperties
      Removed value: -false
  4. Changed1 schema field changedv0.5.2
    • removedInput schema / properties / branch
      Removed value: -{
      -  "description": "Branch to target; defaults to the connection's branch",
      -  "type": "string"
      -}
  5. Changed1 schema field changedv0.5.1
    • addedInput schema / properties / dry_run
      Added value: +{
      +  "description": "Validate a facts commit and return its structured SHACL report without writing. Only supported for mode=facts.",
      +  "type": "boolean"
      +}
  6. First observedv0.2.1

TDQS

A4.1/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Far exceeds the annotations: it documents the approval flow (MCP form elicitation, approval_declined, approval_required, LBB_MCP_DESTRUCTIVE=allow override), idempotency_key content-hash derivation and dedupe behavior, edge_idempotency default of append, and the RDF-graph semantics where a field, label, or single-target relation is replaced and history remains readable. It also discloses refusal conditions (evidence required for confidence/valid_time, entity_embeddings and preconditions refused) and that retract_entities on RDF graphs requires purge_entity_properties. No conflict with destructiveHint=true or idempotentHint=true.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Content is largely load-bearing, but the prose is a dense wall of long, clause-heavy sentences with no mode-by-mode structure or front-loaded summary of the four modes. Several sentences (the RDF replacement behavior, the retract_entities rationale) are convoluted enough to slow parsing, and the mode gating is buried mid-paragraph.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 15-parameter, nested, no-output-schema tool, it covers modes, approval semantics, idempotency, RDF-graph specific behavior, and refusals well. It falls short on response shape (no output schema and only incidental mentions of a receipt and written_properties echo) and does not say how to determine whether a graph is support-enabled before calling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With schema coverage at 67%, the schema already documents several params (observed_at, edge_idempotency, retract_edges, retract_entities, purge_entity_properties, records), but the description adds a mode-to-parameter mapping that the schema does not express, plus evidence prerequisites for confidence/valid_time and the refusal of entity_embeddings on RDF graphs. It leaves some ambiguity, e.g. which params are valid under which mode beyond the obvious ones, but the added meaning is substantial.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a specific verb and resource stack: write graph facts, retract them, or label ranked results, and then names each mode's role (facts, retract, search_feedback, records). It clearly reads as the graph write/retract path and is distinguishable from read-oriented siblings like lbb_query or lbb_rdf, but it never explicitly contrasts with them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Each mode is scoped with when-to-use context: retract for a wrongly-added fact without a full reset, purge_entity_properties for whole-record removal, skip_unchanged for re-runnable backfills, and records for strict records/1 bodies. This is strong conditional guidance, though it does not point to sibling tools (e.g. reads via lbb_query, graph inspection via lbb_inspect) for the prerequisite checks it implies.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.