Skip to main content

schemabrain entities

Semantic entities are the named objects in your domain — users, orders, products — that bind to a physical table and an identity column. They underpin every semantic-layer MCP tool (list_entities, describe_entity, find_relevant_entities, get_metric, resolve_join, list_joins, list_metrics).
Five actions: list, apply, suggest, export, export-all.

list

List entities in the local store. The verification path after apply.

apply

Load entity YAML file(s) or directory(ies) into the local store.
Multi-file apply lands each file independently. An error in one file skips that file and reports it in the summary — the rest still apply.

suggest

LLM-suggest entities for an indexed schema. Three mutually-exclusive output modes.
One of these is required:

export

Render one entity from the local store as apply-ready YAML on stdout (or --out PATH).

export-all

Write one apply-ready YAML per entity into --dir. Pairs with schemabrain apply <dir> for the full store ↔ YAML round-trip.

Examples

Suggest, then review, then apply

Round-trip the store to disk for version control

Apply hand-authored entities


MCP tool — list_entities

The MCP surface entities feed into.

schemabrain metrics

Metrics anchor on entities — curate entities first.

schemabrain joins

Canonical joins reference entity names.

Semantic layer

What entities mean in the SchemaBrain architecture.