canonic sl exposes the semantic-layer capabilities directly: useful for debugging what a metric resolves to or what SQL a query compiles down to, without executing anything.
With
--json, each of these commands’ output matches its corresponding MCP tool payload byte-for-byte (resolve_metric, compile_query, describe_metric).sl resolve
Resolve a name to its canonical binding.
Prints the resolved metric, owning source, measure, and binding kind.
sl compile
Compile a semantic query to SQL + metadata without executing it.
--metrics/--dimensions/--filter/--via/--limit and -f are mutually exclusive, same as canonic query. See canonic query for the full filter syntax. The flags build the identical SemanticQuery a JSON file would deserialize: {"metrics": [...], "dimensions": [...], "filters": [...], "via": [...], "limit": null}. Output includes the target dialect, the compiled SQL, resolved bindings, and any guardrails that fired.
sl describe
Return grain, dimensions, measures, and freshness for one metric.
Prints the metric’s source, grain, dimensions, freshness (
last_validated_at), and any worked examples on file.