Skip to main content
Glama
littlebigbrains

@littlebigbrain/mcp

@littlebigbrain/mcp

Ten task-shaped MCP tools that let Claude, Cursor, Codex, or any MCP client search, query, and write a Little Big Brain graph. Ships two ways: a hosted endpoint with OAuth sign-in, and a local stdio server.

The client opens WorkOS sign-in; your machine never stores a Little Big Brain key. Point it at your stack:

{
  "mcpServers": {
    "lbb": {
      "url": "https://mcp.littlebigbrain.com/mcp/<stack-slug>"
    }
  }
}

Codex sends the URL as an OAuth resource, so use the origin plus a stack header instead:

{
  "mcpServers": {
    "lbb": {
      "type": "http",
      "url": "https://mcp.littlebigbrain.com",
      "headers": { "X-LBB-Stack": "<stack-slug>" }
    }
  }
}

Related MCP server: RDF4J MCP Server

Local (stdio)

Run against any data-plane endpoint with a stack API key:

{
  "mcpServers": {
    "lbb": {
      "command": "npx",
      "args": ["-y", "@littlebigbrain/mcp"],
      "env": {
        "LBB_BASE_URL": "https://0abc1def--production.db.eu.littlebigbrain.com",
        "LBB_API_KEY": "lbb_sk_live_..."
      }
    }
  }
}

Set LBB_GRAPH or LBB_BRANCH to target a scope other than main. LBB_BASE_URL has no hosted default: copy endpoint_url from the stack's Connect page. The MCP process exits with a configuration error when it is missing.

Tools

Tool

Use it for

lbb_inspect

ontology, schema, entity, state, history, and provenance

lbb_query

SPARQL text, structured SPARQL bodies, and canned analysis

lbb_commit

facts, properties, and embeddings

lbb_observe

conversation episodes plus reviewed extraction

lbb_branch

isolation branches and validated merge

lbb_models

shadow evaluation and training datasets

lbb_configure

ontology definition and atomic schema publication

Read tools return compact structured envelopes by default — use detail, row_limit, and returned cursors to page without silently truncating. Write tools derive an idempotency key unless you provide one.

Embed the server

For self-hosting behind your own auth, the package also serves the tools over HTTP:

import { createMcpHttpServer } from "@littlebigbrain/mcp";

createMcpHttpServer({
  baseUrl: "https://0abc1def--production.db.eu.littlebigbrain.com",
  mcpPath: "/mcp",
  allowedHosts: ["127.0.0.1", "localhost", "::1"],
}).listen(8080, "127.0.0.1");

The embedded server passes a key bearer to the data plane; the hosted endpoint's OAuth and ownership layer is served separately by the Little Big Brain API.

Full tool schemas and examples: docs.littlebigbrain.com/sdks/mcp.

Available Tools

7 tools
lbb_branchA

Branch lifecycle. Actions: create (fork a new branch off from_branch — the tool's branch argument names the NEW branch) and merge (validate-then-merge: replay from_branch's post-fork commits onto the scoped target branch — its fork parent — as ONE commit with event ids preserved; SHACL-validates the would-be merged state first and refuses with the report on violations; a fact superseded on the target after the fork wins over the branch's version, reported as a supersedure_race conflict; delete_source consumes the merged branch).

ParametersJSON Schema
NameRequiredDescriptionDefault
graphNoGraph to target; defaults to the connection's graph
actionYescreate = fork a new branch; merge = replay a child branch onto its fork parent
branchNoBranch to target; defaults to the connection's branch
validateNomerge only: refuse on SHACL violations of the would-be merged state (default true)
from_branchYescreate: the branch to fork from; merge: the child branch whose commits are replayed
delete_sourceNomerge only: delete every object under the merged branch after success

TDQS

A4.6/5.0
Behavior5/5

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

The description reveals critical behavioral traits: merge replays as one commit, SHACL validation is performed, conflicts are reported, and delete_source is destructive. This goes beyond the annotations which only indicate readOnlyHint=false, destructiveHint=false. No contradiction with annotations.

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

Conciseness4/5

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

The description is concise, with one dense paragraph covering all aspects. It front-loads with 'Branch lifecycle' and then details actions. While packed with information, it remains clear and avoids redundancy, though slightly more structure could improve readability.

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

Completeness5/5

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

Given the tool's complexity (6 parameters, 2 required, no output schema), the description provides comprehensive coverage: actions, parameter roles, validation behavior, conflict handling, and destructiveness. It equips an agent to use the tool correctly without missing critical context.

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?

All 6 parameters have schema descriptions (100% coverage). The tool description adds extra context for parameters like 'from_branch' (explains role in create vs. merge) and 'delete_source' (explains it consumes the branch), enhancing understanding beyond the schema definitions.

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

Purpose5/5

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

The description clearly specifies the tool handles the branch lifecycle with two distinct actions ('create' and 'merge'), each explained with sufficient detail. It differentiates from sibling tools by focusing on branching operations, while siblings like lbb_query or lbb_commit serve different purposes.

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?

The description explains when to use create vs. merge, including specifics like 'merge: replay a child branch onto its fork parent' and 'delete_source consumes the merged branch.' It does not explicitly state when not to use it or mention alternatives, but the context of branching is well-defined.

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

lbb_commitA
Idempotent

Write graph facts, retract them, or label ranked results. 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.

ParametersJSON Schema
NameRequiredDescriptionDefault
modeNo
graphNoGraph to target; defaults to the connection's graph
branchNoBranch to target; defaults to the connection's branch
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).
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.

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, the description discloses meaningful behavioral details: explicit idempotency_key wins, otherwise MCP derives a content hash for dedupe; facts mode defaults edge_idempotency to append; skip_unchanged is recommended for re-runnable backfills; retract removes current edges while keeping history for as-of reads. These details align with the idempotentHint and destructiveHint annotations rather than contradicting them.

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

Conciseness5/5

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

The description is dense but efficient: four sentences cover all three modes, idempotency behavior, feedback grading, and backfill guidance. Every sentence carries operational value, and the most important mode distinction is front-loaded.

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 12-parameter, three-mode mutation tool with no output schema, the description covers mode selection, idempotency, retract semantics, and backfill behavior well. It does not broadly describe the response/return shape outside a mention of written_properties in the entity_properties parameter, so a small completeness gap remains.

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 58% schema coverage, the description compensates for several sparse parameters by explaining mode semantics, idempotency_key behavior, edge_idempotency defaults, observed_at backfill usage, and feedback grade meanings. Some parameters like graph, branch, and triplets still rely on the schema, but the description adds substantial meaning beyond the raw JSON schema.

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

Purpose5/5

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

The description opens with a specific verb and resource: 'Write graph facts, retract them, or label ranked results.' It then enumerates the three modes (facts, retract, search_feedback) with concrete actions, making the tool's purpose unmistakable and clearly distinct from read-only siblings like lbb_query and lbb_inspect.

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?

The description gives clear mode-level guidance: use facts for writing triplets/embeddings/properties, retract for removing wrongly-added facts without a full reset, and search_feedback for storing relevance labels. It does not explicitly name sibling alternatives or say when not to use the tool, but the mode selection guidance is strong enough for an agent to choose correctly.

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

lbb_configureC

Mutate stored graph configuration. Actions: define_ontology, evolve_ontology, and publish_schema. Schema publication atomically activates metadata and enqueues durable conformance; it never validates the whole graph in the request.

ParametersJSON Schema
NameRequiredDescriptionDefault
opsNoOntology changes to apply in order (additive, in-place edits, or subtractive)
graphNoGraph to create or redefine
actionYesSelects the variant (one of: define_ontology, publish_schema, evolve_ontology).
branchNoBranch to target; defaults to the connection's branch
formatNo
shapesNo
sourceNo
ontologyNo
relationsNo
desired_modeNo
entity_typesNo
merge_defaultNo
confirm_restrictiveNo
allow_data_conflictsNoApply subtractive ops (narrow/remove) even when current data conflicts; affected records are kept and begin to warn. Default false rejects a conflicting subtractive request and reports the conflicts.

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already indicate the tool is not read-only (readOnlyHint=false) and not strictly destructive (destructiveHint=false). The description adds that schema publication is atomic and does not validate the whole graph, which is a useful behavioral trait. However, it omits other important details like error handling, rollback behavior, or permission requirements.

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

Conciseness4/5

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

The description is concise at two sentences, with the first stating the overall purpose and the second adding a specific behavioral note. No redundant information. However, it could be slightly better structured with bullet points or clearer separation of the three actions, especially given the tool's complexity.

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

Completeness2/5

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

Given the tool's complexity (14 parameters, nested objects, no output schema), the description is far too brief. It does not explain what the tool returns, how to construct the 'ops' array for different operations, or cover error scenarios. An agent would need to infer much from parameter names alone, which is insufficient for correct invocation.

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

Parameters2/5

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

With only 36% schema description coverage, the description should compensate by explaining key parameters, but it does not. It mentions the 'action' enum values but offers no additional meaning for the 'ops' array, 'graph', 'branch', or other parameters. The schema itself provides some descriptions (e.g., for ops items), but the description fails to add value beyond that.

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 description clearly states the verb 'mutate' and the resource 'graph configuration', and lists three specific actions (define_ontology, evolve_ontology, publish_schema). This distinguishes it from siblings like lbb_commit (data mutations) and lbb_search (queries). However, it does not elaborate on the unique purpose of each action, leaving some ambiguity.

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

Usage Guidelines2/5

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

The description provides a specific behavioral note for publish_schema (atomic activation, no full graph validation) but gives no guidance on when to use this tool versus alternatives, such as when to evolve vs. define an ontology. There is no mention of prerequisites, context, or exclusions, so an agent has little support for choosing this tool over siblings.

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

lbb_inspectA
Read-only

Read graph context and exact graph facts. Actions: guide, ontology, ontology_conformance, schema, ontology_search, metadata, entity, state, history, transitions, why. schema reads active ontology/SHACL bundle metadata without running validation. ontology_conformance serves the durable report referenced by the pinned published root. entity returns one node's metadata, scalar attributes, bounded Base-backed edge neighborhood, history, and observations. Use lbb_query with SPARQL property paths for precise path selection.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameNo
as_ofNoValid-time snapshot pin (RFC3339): reproduce the node as of this instant.
graphNoGraph to target; defaults to the connection's graph
queryNoOntology concept, term, or relation to search
top_kNo
actionYesSelects the variant (one of: guide, ontology, ontology_conformance, schema, ontology_search, metadata, entity, state, history, why, transitions).
branchNoBranch to target; defaults to the connection's branch
detailNoResponse detail level. Defaults to compact.
relationNo
entity_idNoEntity id (hex); alternative to entity_type+name
entity_typeNo
source_nameNo
source_typeNo
target_nameNo
target_typeNo
as_of_commit_seqNoSnapshot pin: reproduce the node (state, edges, history) as of this commit_seq.

TDQS

A3.5/5.0
Behavior4/5

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

The readOnlyHint annotation is consistent with the description's 'Read' framing. The description adds useful behavioral detail beyond the annotation: schema does not run validation, ontology_conformance serves a durable report, and entity returns a bounded edge neighborhood. These specifics help the agent predict side effects and scope.

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

Conciseness4/5

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

The description is compact and front-loaded with the primary purpose. Each sentence adds either action enumeration, behavioral clarification, or routing guidance. The action list is somewhat redundant with the schema enum, but it is not padded with filler.

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

Completeness2/5

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

For a tool with 11 action variants and 16 parameters and no output schema, the description leaves many actions unexplained, including guide, ontology, metadata, state, history, transitions, and why. It also does not describe return shapes or parameter combinations. The description is not complete enough to guide correct invocation across the full action space.

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

Parameters2/5

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

With schema description coverage at 50%, the description needed to compensate for undocumented parameters such as name, top_k, relation, entity_type, source_name, source_type, target_name, and target_type. It does not address these, instead focusing on action-level meaning. The description adds some high-level context for action selection but leaves many parameter semantics unresolved.

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 description opens with a specific verb and resource ('Read graph context and exact graph facts') and enumerates all 11 action variants, giving the agent a clear sense of the tool's domain. It also distinguishes the tool from lbb_query. However, 'graph context' is somewhat vague, and the action list alone does not fully define what each action returns.

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?

The description explicitly directs the agent to lbb_query for precise SPARQL property path selection, which serves as a clear when-not-to-use signal. It also gives targeted usage context for schema, ontology_conformance, and entity actions. It does not explain when to use the remaining actions, but the core routing guidance is present.

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

lbb_modelsB
Read-only

Read model-training inputs or compare retrieval configurations over one pinned published snapshot. shadow_eval takes the API ShadowEvalRequest body; dataset actions return bounded training examples at an optional signal split.

ParametersJSON Schema
NameRequiredDescriptionDefault
bodyNo
graphNoGraph to target; defaults to the connection's graph
limitNo
actionYes
branchNoBranch to target; defaults to the connection's branch
detailNoResponse detail level. Defaults to compact.
split_seqNo

TDQS

B3.3/5.0
Behavior4/5

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

Annotations already mark readOnlyHint=true, so no contradiction. Description adds context about operating 'over one pinned published snapshot' and explains action-specific behavior (shadow_eval body, dataset returns bounded examples). This adds value beyond annotations.

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

Conciseness4/5

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

Two sentences with no wasted words, but the information could be better structured (e.g., separating action types into a list). Still efficient.

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

Completeness2/5

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

No output schema exists, so description should clarify return values, but it doesn't. It also omits explanation of the 'limit', 'graph', 'branch', and 'detail' parameters. While it covers the two action groups, it is incomplete for a 7-parameter tool with nested objects.

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

Parameters3/5

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

Schema description coverage is 43%, so the schema leaves gaps. The description partially compensates by explaining the 'shadow_eval' action requires the body parameter and that dataset actions use an optional signal split, but does not cover graph, branch, limit, or detail parameters.

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 description clearly states the tool reads model-training inputs or compares retrieval configurations, using verbs like 'Read' and 'compare'. It distinguishes from sibling tools by focusing on model-training and snapshots, but could be more specific about the scope.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus siblings like lbb_query or lbb_inspect. The description lacks explicit context for selection criteria.

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

lbb_observeA

Remember a conversation: store the turns verbatim as an EPISODE evidence entity, then anchor + gate the supplied facts on an observe branch (LLM extraction cannot poison the main graph). Facts with both endpoints already in the graph are anchored; unanchored facts need confidence >= 0.8 to mint new entities, else they come back needs_review. auto_merge merges the branch onto the scoped branch when SHACL validation is clean (the validate-then-merge). Server flag-gated (--enable-observe). This build takes caller-extracted facts (each with a structured triplet); bare statements come back needs_review.

ParametersJSON Schema
NameRequiredDescriptionDefault
factsNoCaller-extracted candidate facts; omit with extract:false to store the episode only
graphNoGraph to target; defaults to the connection's graph
turnsYesThe conversation slice to remember (stored verbatim)
branchNoBranch to target; defaults to the connection's branch
sourceNoSource label, e.g. support-bot
extractNofalse = store the episode only (default true)
auto_mergeNoMerge onto the scoped branch when validation is clean
session_idYesCaller's conversation id (drives the default observe branch name)
observe_branchNoBranch for the facts (default observe-<hash12(session_id)>)

TDQS

A4/5.0
Behavior4/5

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

The description adds significant behavioral context beyond the minimal annotations (readOnlyHint=false, etc.). It explains the branching model, the anchoring vs. needs_review outcomes, the auto-merge with SHACL validation, and the server flag dependency. No contradictions with annotations.

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

Conciseness4/5

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

The description is well-structured and front-loaded with the main purpose. All sentences add value, though some technical details (e.g., auto_merge behavior) could be slightly more streamlined. It is appropriately sized for the tool's complexity.

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

Completeness3/5

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

Given the tool has 9 parameters and no output schema, the description covers the core logic (anchoring, confidence, auto-merge) and mentions the server flag. However, it does not describe the return format or error conditions, leaving agents to infer the response structure.

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

Parameters3/5

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

Schema description coverage is 100%, providing baseline parameter documentation. The description adds interpretive context (e.g., 'omit with extract:false to store the episode only', 'confidence >= 0.8 to mint new entities'), but does not fully explain all parameters beyond what the schema already states.

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

Purpose5/5

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

The description clearly states the tool's purpose: storing conversation turns verbatim as an EPISODE evidence entity and anchoring/gating facts on an observe branch. It uses specific verbs ('remember', 'store', 'anchor', 'gate') and distinguishes it from siblings by highlighting the observe branch and the fact anchoring behavior.

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?

The description provides context on when to use the tool (for adding facts without poisoning the main graph) and explains the anchoring logic and confidence threshold. However, it lacks explicit 'when not to use' or direct comparisons to sibling tools like lbb_commit or lbb_ground.

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

lbb_queryA
Read-only

Analytical and expert reads. Modes: structured (SPARQL-subset JSON body), sparql (SPARQL text), analyze. SPARQL is the only query surface. Relations are https://littlebigbrain.com/r/NAME and types https://littlebigbrain.com/class/NAME (both lowercased); entities are content-addressed, so anchor a named one by its rdfs:label rather than building its IRI. Structured and text queries pin one published watermark for the request.

ParametersJSON Schema
NameRequiredDescriptionDefault
bodyNoStructured SPARQL-subset request body. Shape: { patterns: [{ subject, predicate, object }], filters?, group_by?, group_keys?, aggregates?, having?, order_by?, select?, limit?, distinct? }. Each pattern term is { var: "x" } or a fixed { entity: { entity_type, name } }; `predicate` is a relation name and is case-insensitive here (FOR_CLIENT and for_client both resolve — unlike SPARQL text, which needs the lowercased IRI local name). FILTER — `filters` is a list of conditions, each of exact shape { "compare": { "op": <op>, "left": <term>, "right": <term> } } (or { "and": [<filter>…] }, { "or": [<filter>…] }, { "not": <filter> }). `op` is one of eq | ne | lt | le | gt | ge (NOT the symbols =,<,>). Each <term> is exactly one of { "var": "x" }, { "property": { "var": "x", "field": "amount" } } (a typed scalar attribute), or { "value": <typed> } — and <typed> is exactly one wrapper: { "str": "…" }, { "i64": 5 }, { "f64": 0.9 }, { "bool": true }, { "date_time": "2026-01-01" } (RFC3339), or { "entity": { "entity_type": "T", "name": "N" } }. Complete runnable example — deals whose amount ≥ 1000000: { "patterns": [{ "subject": { "var": "d" }, "predicate": "for_client", "object": { "var": "c" } }], "filters": [{ "compare": { "op": "ge", "left": { "property": { "var": "d", "field": "amount" } }, "right": { "value": { "f64": 1000000 } } } }] }. Comparisons use the field's real declared type (numbers as numbers, datetimes as instants), so they run server-side. GROUP BY supports both entity-identity keys (group_by: ["s"]) and typed scalar keys via group_keys: a property value ({ property: { var, field, as } }) or a calendar bucket of a datetime property ({ date_bucket: { var, field, granularity: year|month|week|day|hour, as } }). Scalar keys come back per group under value_keys[as] — so a per-area breakdown or a commits-per-month time series is one server-side query, no client-side bucketing. Worked example -- commits per area per month in one query: { "patterns": [{ "subject": { "var": "c" }, "predicate": "committed_to", "object": { "var": "repo" } }], "group_keys": [{ "date_bucket": { "var": "c", "field": "committed_at", "granularity": "month", "as": "m" } }, { "property": { "var": "c", "field": "area", "as": "area" } }], "aggregates": [{ "func": "count", "as": "n" }], "order_by": [{ "var": "m" }] } -- area and committed_at are typed entity attributes (set via entity_properties; readable flat under attributes, never a nested metadata blob), and each group returns value_keys.m + value_keys.area + aggregates.n. `having: [...]` takes the same filter shape over the aggregated groups (e.g. { "compare": { "op": "gt", "left": { "var": "n" }, "right": { "value": { "i64": 10 } } } }). A `combinators` key (UNION/OPTIONAL/MINUS/EXISTS) is rejected here; express those with SPARQL text under mode=sparql. Cheap aggregate count: pair an equality having (e.g. { "compare": { "op": "eq", "left": { "var": "n" }, "right": { "value": { "i64": 4 } } } }) with row_limit: 1 -- the response row_page.total reports how many groups match without materializing them all, so you read the count off row_page.total instead of paging every matching row. For snapshot pinning prefer the top-level `as_of` / `as_of_commit_seq` arguments below; a bare `as_of` key inside the body is rejected (the body's valid-time field is `as_of_valid_time`).
modeYesSelects the variant (one of: structured, sparql, analyze).
as_ofNoSnapshot pin (valid-time, RFC3339): evaluate the body as of this instant. Folded into the request's `as_of_valid_time`. Top-level here is the supported spelling — a bare `as_of` inside the body is rejected, since the server silently ignores it.
chartNo
fieldNo
graphNoGraph to target; defaults to the connection's graph
queryNoSPARQL 1.1 query text (SELECT or ASK). IRI scheme: relations are <https://littlebigbrain.com/r/NAME> (NAME lowercased, e.g. writes_to; reverse a relation with the ^ path operator, no stored inverse triple). Types are <https://littlebigbrain.com/class/NAME> (lowercased), matched as `?x a <…/class/NAME>` with rdfs:subClassOf closure on by default. Property fields are <https://littlebigbrain.com/p/NAME> (lowercased). The local name is ALWAYS lowercase — an uppercase one (e.g. <…/r/FOR_CLIENT>) is a different, non-existent IRI that silently matches nothing; this tool auto-lowercases the local name of /r/, /class/, and /p/ IRIs for you and adds a `notes` entry when it does, so a stray uppercase still resolves. (Structured mode's `predicate` is case-insensitive on its own.) Entities are content-addressed <https://littlebigbrain.com/e/HASH> — never build an entity IRI from a name; anchor a named entity by its label instead: `?e <http://www.w3.org/2000/01/rdf-schema#label> "Acme"`. Discover the exact relation and type names with lbb_inspect action=ontology. SELECT and ASK only (CONSTRUCT/DESCRIBE are rejected). Example: SELECT ?service ?db WHERE { ?service <https://littlebigbrain.com/r/writes_to> ?db } LIMIT 10
top_kNo
branchNoBranch to target; defaults to the connection's branch
cursorNoOpaque cursor from a previous lbb_query row page; reruns the original query at the next offset.
detailNoResponse detail level. Defaults to compact.
metricNo
sparqlNo
row_limitNoMaximum query rows to return in this page. Defaults by detail: compact=20, standard=100, full=1000.
as_of_commit_seqNoSnapshot pin: evaluate the body as of this commit_seq, hiding later commits. Errors if past head. Top-level alias for the body's `as_of_commit_seq` (either works for this one).

TDQS

A4.2/5.0
Behavior5/5

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

Even with readOnlyHint=true, the description adds substantial behavioral detail: content-addressed entities should be anchored by label, SPARQL IRIs are auto-lowercased with a notes entry, uppercase local names silently match nothing, body-level as_of is rejected while top-level works, and only SELECT/ASK are accepted. These quirks are critical to correct invocation and are disclosed clearly.

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

Conciseness5/5

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

The free-text description is four dense sentences with no filler, front-loading the tool's purpose and core constraint. The long examples live inside the body schema where they are needed, rather than bloating the main description.

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

Completeness3/5

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

Structured and SPARQL modes are documented in depth with examples, constraints, and response hints like row_page.total and value_keys. But analyze mode is only named, and the analyze-oriented parameters (metric, chart, field, top_k) are unexplained, leaving a material invocation gap. With no output schema, the description is not fully self-sufficient.

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?

The body and query parameters receive exhaustive semantic treatment with complete runnable examples, type wrappers, and grouping/filter semantics. However, 5 of 15 parameters (chart, field, metric, top_k, sparql) have no meaningful explanation, and the analyze mode they likely serve is not described, so the parameter surface is not fully covered.

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 description opens with 'Analytical and expert reads' and states 'SPARQL is the only query surface', making clear this is a read/query tool. It names three modes (structured, sparql, analyze) and gives URI conventions, so an agent can identify the resource being queried. It does not explicitly position itself against siblings beyond mentioning lbb_inspect for ontology discovery, so it stops short of 5.

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?

It gives explicit mode-selection guidance: structured mode rejects UNION/OPTIONAL/MINUS/EXISTS combinators and directs the agent to SPARQL text, and it instructs using lbb_inspect action=ontology to discover relation/type names. Snapshot pinning preference is also stated (`prefer the top-level as_of / as_of_commit_seq`). No comprehensive when-not-to-use guidance is given, but within-tool alternation is well covered.

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

TDQS

A3.9/5.0
Disambiguation5/5

Each tool targets a distinct phase of the knowledge-graph workflow: querying, inspecting, model-data access, writing, configuration, branching, and observation. Even the two read-focused tools are cleanly separated by SPARQL/expert queries versus graph context and exact facts.

Naming Consistency5/5

All tools share the uniform lbb_ prefix and use short, lowercase, action-oriented names. The convention is predictable and easy to scan, with no mixed casing or synonymous verb clutter.

Tool Count5/5

Seven tools is well-scoped for a knowledge-graph server with query, inspection, commit, configure, branch, and memory workflows. Each tool earns its place and the count keeps the surface navigable despite each tool carrying several internal modes.

Completeness4/5

The surface covers the core lifecycle: read, write, retract, inspect, configure ontology, branch, merge, and capture observations. A minor gap is the lack of an explicit branch listing/deletion tool outside of merge consuming the source branch, but inspection and state actions partially cover this.

Maintenance

ActivityActive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    An MCP server that enables AI-powered exploration of RDF data and SPARQL querying via RDF4J. It provides tools for executing queries, searching knowledge graph resources, and retrieving schema summaries.
    13
    1
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/littlebigbrains/lbb-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server