Layer 4 — mechanical reference for every verb in Sandbar's MCP
tools/listcatalog. Organized by group. For practical client patterns seedoc/guides/writing-an-mcp-client.md; for the design rationale seedoc/concepts/mcp-protocol.md.
All verbs are invoked via JSON-RPC 2.0 over HTTP at /mcp:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {"name": "<verb-name>", "arguments": {...}}
}
Results are wrapped in the MCP content envelope:
{"result": {"content": [{"type": "text", "text": "<JSON-stringified payload>"}]}}
Clients must JSON.parse(result.content[0].text) to extract the actual return value.
Verbs follow sandbar.<group>.<verb> — one verb per operation kind, parameterized by class via arguments (not per-class verb names). This is the F-B-001 resolution (see mcp-protocol.md).
sandbar.schema.classesArguments: none
Returns every :dt/Class instance ident in the metamodel.
sandbar.schema.propertiesArguments: none
Returns every :dt/Property instance ident in the metamodel.
sandbar.schema.datatypesArguments: none
Returns every :db.type/* value type.
sandbar.schema.entitiesArguments: {classes?: string[]}
Batch fetch entities across classes. Single round-trip alternative to N+1 sandbar.class.instances calls.
Returns {by-class: {<class-ident>: [<entity-map>...]}, total-classes: int, total-entities: int}.
If classes is omitted, fetches all non-abstract classes. Per Stage G Signal 8 (corpus-side friction discovery).
sandbar.class.describeArguments: {class: string}
Returns {abstract?, parents, ancestors, subclasses, slots} for the class.
sandbar.class.slotsArguments: {class: string}
Returns the effective slot set (inherited + direct).
sandbar.class.direct-slotsArguments: {class: string}
Returns only the directly-declared slots.
sandbar.class.required-slotsArguments: {class: string}
Returns the subset of slots that are required (:dt/required? true).
sandbar.class.instancesArguments: {class: string}
Returns every instance of the class (including subclass instances).
For multi-class fetch, prefer sandbar.schema.entities for the single-round-trip path.
sandbar.class.subclassesArguments: {class: string}
Returns every transitive subclass.
sandbar.class.parentsArguments: {class: string}
Returns direct parents and all ancestor classes.
sandbar.class.validate-all-instancesArguments: {class: string}
Synchronously validates every instance of the class.
For large classes, prefer the workflow-backed sandbar.validation.start — it's cancellable and produces a queryable history.
sandbar.types.instance-ofArguments: {class: string, entity: string}
Returns {instance-of?: boolean}.
sandbar.types.subclass-ofArguments: {parent: string, child: string}
Returns {subclass-of?: boolean}.
sandbar.property.domainArguments: {property: string}
Returns the property's :dt/domain class.
sandbar.property.rangeArguments: {property: string}
Returns the property's :dt/range value type.
sandbar.property.cardinalityArguments: {property: string}
Returns :db.cardinality/one or :db.cardinality/many.
sandbar.entity.createArguments:
{
"class": "<class-ident>",
"slots": {...}, // optional when source+format provided
"format": "<codec-format-keyword>", // optional; requires :source
"source": "<native-representation>" // optional; requires :format
}
Creates a new entity. When format + source are present, the codec mediator parses source and merges with explicit slots (explicit slots win). Validated via dt/make.
Returns the new entity's :db/id + slot snapshot.
Codec routing is per the class's :dt/native-codec (see codec-protocol.md).
sandbar.entity.findArguments: {ident?: string, id?: integer}
Returns an entity by ident or eid.
sandbar.entity.updateArguments: {entity: string, slots: object}
Updates slot values on an existing entity. Currently not yet implemented — pending the dt/update-entity primitive. Returns an error code until that lands.
sandbar.entity.validateArguments: {class: string, slots: object}
Pre-transaction validation — checks that slots would be valid for class without writing. Returns nil if valid or {errors: [...]}.
sandbar.workflow.defineArguments: {spec: object}
Registers a new workflow definition. spec is the workflow definition map (see designing-workflows.md).
sandbar.workflow.findArguments: {workflow: string}
Looks up a workflow definition by ident.
sandbar.workflow.start-processArguments: {workflow: string, subject: string, data?: object}
Creates a new process attached to a subject entity. Returns the new process id.
sandbar.workflow.transitionArguments: {process-id: integer, transition: string, reason?: string}
Applies a named transition to a process. Returns the new state.
sandbar.workflow.process-stateArguments: {process-id: integer}
Returns {current-state, terminal?, terminal-kind, completed?}.
sandbar.workflow.process-historyArguments: {process-id: integer}
Returns the full transition history of a process.
sandbar.workflow.active-processesArguments: {workflow?: string}
Returns active (non-terminal) processes; optionally filtered by workflow ident.
These verbs back long-running validation runs as workflow processes.
sandbar.validation.startArguments: {class: string}
Begins validating every instance of class. Returns a task envelope:
{"task-id": <integer>, "status": "pending"}
The task is queryable via tasks/get task-id; cancellable via tasks/cancel task-id.
sandbar.validation.runArguments: {validation-id: integer}
Executes a previously-started (queued) validation.
sandbar.validation.cancelArguments: {validation-id: integer}
Cancels an in-flight validation.
sandbar.validation.retryArguments: {validation-id: integer}
Re-runs a failed validation.
sandbar.validation.resultsArguments: {validation-id: integer}
Fetches the results of a completed validation run.
sandbar.validation.historyArguments: {class?: string}
Recent validation runs — all classes or filtered by class.
sandbar.codec.listArguments: none Returns the set of registered codecs:
[
{"name": ":codec/markdown", "mime-types": ["text/markdown"], "supports": ["mm/Memory"]},
{"name": ":codec/json", "mime-types": ["application/json"], "supports": "any"}
]
sandbar.project.exportArguments:
{
"to": "<output-directory>",
"filter": {
"class": "<ident>",
"classes": ["<ident>", ...],
"tree-filter": "<rel-path-prefix>"
}
}
Projects entities to a filesystem hierarchy at to. Each entity emits via its class's :dt/native-codec. Per Anderson de.setf.rdf:project-graph lineage — see projection.md.
The filter is optional; when present, narrows which entities project.
sandbar.project.importArguments:
{
"from": "<input-directory>",
"filter": {...}
}
Walks the directory, parses each file via the appropriate codec, returns the entity-spec maps. Inverse of project.export.
The four-axis retrieval surface's aggregation axis. See aggregation.md for theory.
sandbar.aggregate.countArguments:
{
"class": "<ident>",
"where": "<EDN-string Datalog clauses>"
}
Count entities of class matching optional :where filter. Returns {:count <int>}. :where arrives as EDN string because JSON has no native representation for Datalog symbols.
sandbar.aggregate.group-byArguments:
{
"class": "<ident>",
"group-by": "<slot-ident>",
"where": "<EDN-string Datalog clauses>"
}
Group instances by slot value; count per group. Returns {:groups {value count} :total <int>}.
sandbar.aggregate.rank-byArguments:
{
"class": "<ident>",
"rank-by": ":degree | :backlink-density | :recency | :freshness",
"limit": 20,
"temporal-slot": "<slot-ident>"
}
Re-order instances by structural-rank axis. :temporal-slot REQUIRED for :recency / :freshness (substrate does not hardcode class-specific temporal axes). Returns {:hits [{:entity ... :rank-score ...}] :total <int> :returned <int>}.
The four-axis retrieval surface's navigation axis. See navigation.md for the surface overview and path-grammar.md for the algebra.
sandbar.navigate.path-viaArguments:
{
"from": "<seed-ident>",
"via": "<EDN-string path expression>",
"limit": 0,
"include": ["paths"]
}
Walk a Wilbur-lineage path-grammar expression starting from from. Returns {:reachable [<entity-map>...] :total <int> :returned <int>}.
via is an EDN-string path expression using Canonical-8 + Tier-2 operators (13 executable; Tier-3 vocabulary-registered, compilation deferred):
:SEQ :OR :REP+ :REP* :INV :SELF :RESTRICT :ANY:NOT :OPT :REP (bounded) :FILTER :TEST:include ["paths"] is accepted but path-data is NOT YET POPULATED — result carries :path-data-deferred true flag when requested. Full path-data surfacing lands at a follow-on stage.
Example:
{
"from": ":decisions/foundation",
"via": "[:SEQ [:REP* [:OR :cites :evidences]] [:RESTRICT [:dt/type :mm.memory/decision]]]",
"limit": 50
}
These verbs are part of MCP standard, not Sandbar-specific extensions.
initializeFirst call on a new session. Negotiates protocol version + capabilities.
{"params": {
"protocolVersion": "2025-11-25",
"clientInfo": {"name": "<client-name>", "version": "<client-version>"},
"capabilities": {}
}}
tools/listReturns the verb catalog with input schemas.
tools/callInvokes a verb. Used for every verb above.
resources/listReturns the resource catalog — entities of classes with declared :dt/native-codec.
resources/readArguments: {uri: string}
Reads a resource's content in its native representation.
resources/subscribeArguments: {uri: string}
Subscribes to update notifications for a URI. Server pushes notifications/resources/updated over SSE.
resources/unsubscribeArguments: {uri: string}
Cancels a subscription.
prompts/listReturns prompt templates. (Today: empty; reserved for future use.)
prompts/getFetches a prompt with parameter substitution.
tasks/getArguments: {task-id: integer}
Returns the task's current status + kind + result (if terminal).
tasks/listReturns active tasks.
tasks/cancelArguments: {task-id: integer}
Cancels a running task. Honored only if the underlying workflow process allows cancellation from its current state.
Server-pushed notifications (no id field):
| Method | Payload |
|---|---|
notifications/initialized | {} |
notifications/tools/list_changed | {} |
notifications/resources/list_changed | {} |
notifications/resources/updated | {uri: string} |
notifications/tasks/status | {task-id: int, status: string, kind?: string} |
Subscribed clients receive notifications over their SSE channel; non-subscribed clients see only request/response.
Per JSON-RPC 2.0:
| Code | Meaning |
|---|---|
-32700 | Parse error |
-32600 | Invalid request |
-32601 | Method not found |
-32602 | Invalid params — including unknown tool name, can't cancel |
-32603 | Internal error |
-32000 | Application-defined (auth failure, validation, business logic) |
error.data carries structured details — for unknown tools, it includes available-tools; for validation failures, it includes the :errors shape from dt/validate.
doc/concepts/mcp-protocol.md — design rationaledoc/guides/writing-an-mcp-client.md — practical client patternsdoc/api/dt-star.md — the in-process equivalentsdoc/api/http-rest.md — the REST alternativeCan you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |