About Dql
Dql is an MCP server published by duckcode-ai-labs in the Healthcare category: dQL MCP server: expose certified blocks, semantic layer, lineage, and governance to LLM agents via the Model Context Protocol. Conduid read 53 tools from its source: answer_question, approve_hint, ask_dql, build_block_from_prompt, build_dql_app, build_dql_block and 47 more. It is published to npm as @duckcodeailabs/dql-mcp, a package with no command-line entry point.
The duckcode-ai-labs/zlens monorepo this package is published from has 2 stars and 0 forks, and its last commit was on 3 Dec 2026. Conduid has no tagged release on record for it. It passes all 1 static checks Conduid ran on the repository. Its topics include healthcare.
Install
npm install @duckcodeailabs/dql-mcpgit clone https://github.com/duckcode-ai-labs/zlensTools (53)
answer_questionGoverned one-shot answer. Runs DQL's OWN governed cascade (certified block → semantic metric → generated SQL) end-to-end and returns the executed answer with rows, SQL preview, canonical trust label, citations, and a reviewable draft — the SAME engine and trust guards as the DQL UI. Use this when you want DQL to generate AND answer for you. Prefer query_via_metadata when you want to author the SQL yourself. Requires the ZLens runtime (the workbench `zlens notebook` starts) with an AI model set up in ZLens; without one it returns modelUnavailable and you answer through ask_dql → query_via_block or query_via_metadata instead.| Parameter | Type | Description |
|---|---|---|
| analysisDepth | string | Optional retrieval/analysis depth. |
| audience | string | Answer audience. Default analyst. |
| domain | string | Pin the business domain the question is read in; the runtime resolves it into an envelope (descendants and certified imports admitted, siblings excluded). |
| modelAreaId | string | Focus a model area inside the domain. |
| purpose | string | Approved purpose for a cross-domain import, when the domain requires one. |
| question * | string | Business or analytics question to answer. |
| reasoningEffort | string | Optional model effort (host ceilings still apply). |
| requestedMode | string | Routing mode. Default auto (let the cascade decide). |
| serverUrl | string | Base URL of the local DQL runtime. Default http://127.0.0.1:3474. |
| skillRefs | array | Skills to select for this question (only eligible skills apply). |
| threadId | string | Continue a persisted conversation thread. |
approve_hintEvaluate and approve, or reject, a candidate correction hint. Approval fails closed on stale/unsafe evidence and is the only path that makes a scoped hint usable.| Parameter | Type | Description |
|---|---|---|
| decision * | string | Approve or reject the candidate hint. |
| hintId * | string | Id of the candidate hint to review. |
| note | string | Review evidence note. Required for v3 approval on MCP because MCP has no local SQL executor. |
| reviewer * | string | Who is reviewing. |
ask_dqlHigh-level governed ask router. Use first for business questions. Returns certified-vs-generated route, contextPackId, exact block candidate, allowed SQL context, missing context, trust status, and next safe DQL tool.| Parameter | Type | Description |
|---|---|---|
| domain | string | Pin the business domain the question is read in; the runtime resolves it into an envelope (descendants and certified imports admitted, siblings excluded). |
| focusObjectKey | string | Optional metadata object key to bias retrieval. |
| limit | number | Maximum metadata objects in the context pack. Default 100. |
| modelAreaId | string | Focus a model area inside the domain. |
| purpose | string | Approved purpose for a cross-domain import, when the domain requires one. |
| question * | string | Business or analytics question to route through governed DQL context. |
| skillRefs | array | Skills to select for this question (only eligible skills apply). |
build_block_from_promptGoverned saved query (block) builder from a natural-language prompt. Runs DQL's buildFromPrompt (the same governed engine the UI uses) to draft a reusable, review-required DQL block — you do NOT author SQL. Symmetric with build_dql_app. Returns the draft path, generated SQL, and the Certifier verdict; NEVER auto-certifies. Requires the ZLens runtime (the workbench `zlens notebook` starts) with an AI model set up in ZLens; without one it returns modelUnavailable — then write the SQL yourself and save it with suggest_block.| Parameter | Type | Description |
|---|---|---|
| blockPath | string | Required for mode=edit: the block file to modify. |
| mode | string | Create a new draft, or edit an existing block in place. Default create. |
| owner | string | Owner identity to stamp on the draft. |
| prompt * | string | What the block should compute, e.g. "weekly revenue by region". |
| serverUrl | string | Base URL of the local DQL runtime. Default http://127.0.0.1:3474. |
build_dql_appStart a new App from a description as an App Studio draft. Picks certified data (Datasets, Metrics, saved queries) for the request, lists questions no certified data covers, and returns the draft id, a link that opens it in App Studio at the Data step (openUrl when the workbench is running, always openPath) and the picked sources with reasons. Writes no App files: the user checks the data, builds the pages and publishes in App Studio. saveDraft=false returns the picks only. Never certifies or publishes. Use list_apps to see existing Apps.| Parameter | Type | Description |
|---|---|---|
| aiLayout | boolean | Ignored. App Studio lays out the pages when the user builds them. |
| blocks | array | Certified block names to use as the App data, exactly (from search_blocks). Default: certified data is picked for the prompt. |
| domain | string | Optional business domain; the App draft keeps it and picks data from it. |
| name | string | App name. Default: derived from the prompt. The App id is derived from it. |
| overwrite | boolean | Ignored. Each call creates a new App Studio draft; nothing is overwritten. |
| owner | string | Ignored. The owner is set when the App is published from App Studio. |
| prompt * | string | What the App is for, e.g. "beverage performance for the growth team". It becomes the App goal in App Studio. |
| saveDraft | boolean | Create the App Studio draft. Default true; false returns the picked data only. |
build_dql_blockDeprecated alias of suggest_block (identical behavior, kept for backward compatibility) — prefer suggest_block. Writes a proposed block to the local draft queue with governance results. Does not certify automatically.| Parameter | Type | Description |
|---|---|---|
| chartType | string | Optional visualization type. |
| description * | string | One-line description. |
| domain * | string | Business domain. |
| name * | string | Proposed block name. |
| owner * | string | Block owner identity. |
| sql * | string | The block body SQL. |
| tags | array |
certifyCheck a saved query (block) against the certification rules and report pass/fail with the blocking rules. With the workbench running it runs the same check as the Saved queries page (owner, compile, run, tests); otherwise it checks the declared metadata only and says tests were not run. Changes nothing: a person certifies in Saved queries or with `zlens certify --from-draft`.| Parameter | Type | Description |
|---|---|---|
| name * | string | Block name to evaluate, as shown by search_blocks. |
| serverUrl | string | Base URL of the local DQL runtime for the full check. Default http://127.0.0.1:3474. |
check_compatibilityCheck whether governed metrics can be grouped by the requested dimensions. Returns the compatible dimensions and, for each incompatible one, WHY (no_join_path, one_to_many_only, not_shared_across_metrics, metric_unresolved; one_to_many_only means the only path walks a join one-to-many, which would repeat each metric value, so no governed query can group by it). Call this before compile_semantic_query when a question asks for a breakdown, and use the compatible list to pick an alternative instead of giving up.| Parameter | Type | Description |
|---|---|---|
| dimensions | array | Optional dimensions to check. Omit to list everything the metric set can be sliced by. |
| limit | number | Max compatible dimensions to return. Default 25. |
| metrics * | array | Governed metric names, exactly as returned by search_semantic_layer. |
compile_semantic_queryCompile a governed SQL query from EXPLICIT semantic members (metrics + dimensions + optional time grain/filters). This is the governed path: the compiler validates every member and joins tables via the semantic graph. Prefer this over hand-written SQL whenever the semantic layer covers the question. Returns compiled SQL, or a refusal reason (e.g. a member that does not exist or an uncomposable metric×dimension pair) so you can adjust and retry.| Parameter | Type | Description |
|---|---|---|
| dimensions | array | Semantic dimension names to group by. |
| filters | array | |
| limit | number | |
| metrics * | array | Semantic metric names (from search_semantic_layer). |
| orderBy | array | |
| timeDimension | object |
describe_datasetDescribe one current approved governed App Dataset by exact sourceId, including its approved fields, measures, parameters, lifecycle, and trust. This does not execute SQL.| Parameter | Type | Description |
|---|---|---|
| serverUrl | string | Optional local DQL runtime base URL. |
| sourceId * | string | Exact governed Dataset source id returned by list_datasets. |
describe_notebook_datasetDescribe one local/project/staged notebook dataset including schema, bounded profile, freshness, lineage, and trust. Does not return raw rows.| Parameter | Type | Description |
|---|---|---|
| id * | string |
execute_generated_sqlExecute generated SQL as a bounded, uncertified preview. Use only after inspecting DQL/DBT/semantic context and only for read-only SELECT/WITH analysis.| Parameter | Type | Description |
|---|---|---|
| sql * | string | Read-only SQL to execute as a bounded, uncertified preview. ZLens will add safety limits. |
execute_local_analysisExecute bounded read-only SQL in the notebook DuckDB workspace over imported or staged datasets. Results are always review-required and never certified.| Parameter | Type | Description |
|---|---|---|
| sql * | string |
expand_contextRepair-loop context expander. Use after inspect_metadata_context or query_via_metadata reports an allowed-context gap for a known catalog/runtime relation. It creates a new contextPackId with the requested relation(s), so the agent can retry query_via_metadata without starting over or inventing uninspected SQL.| Parameter | Type | Description |
|---|---|---|
| contextPackId * | string | Existing context-pack id returned by ask_dql or inspect_metadata_context. |
| question | string | Optional refined question used in expansion notes. Defaults to the original context-pack question. |
| relations * | array | Relations to add to the context pack, such as dev.supplies or SHOP.ANALYTICS.supplies. |
explain_metricRead a governed metric's definition: its expression, aggregation, backing table, filters, owner, and description. Use it to answer what a metric MEANS, and to tell two similarly named metrics apart, without running a query.| Parameter | Type | Description |
|---|---|---|
| metric * | string | Metric name exactly as returned by search_semantic_layer. |
explain_relationship_proofInspect one DQL analytical relationship including exact keys, cardinality, fanout, validation evidence, stale status, and cross-domain import/export proof.| Parameter | Type | Description |
|---|---|---|
| relationshipId * | string | Manifest-v3 relationship id. |
feedback_recordRecord thumbs-up/down feedback for local answer-quality review. Feedback does not create or promote a hint and never upgrades generated output to certified.| Parameter | Type | Description |
|---|---|---|
| answerKind * | string | How the answer was classified. |
| blockId | string | Block id the answer was anchored to, if any. |
| comment | string | Optional free-text rationale. |
| question * | string | Original question. |
| rating * | string | Thumbs up or down. |
| user * | string | User who submitted the feedback. |
fetchRead a page| Parameter | Type | Description |
|---|---|---|
| id * | string |
get_blockReturn full metadata, dependencies, and SQL for a saved query (block).| Parameter | Type | Description |
|---|---|---|
| includeSource | boolean | Include full .dql source text. Default true. |
| name * | string | Block name as shown in search_blocks. |
get_table_schemaReturn the qualified relation, ref form, real columns and types, inferred join keys, and governed relationships for a table (a dbt model, or a warehouse relation in a project without dbt) by name, alias, or qualified relation.| Parameter | Type | Description |
|---|---|---|
| table * | string | Model name, alias, or qualified relation. |
inspect_dql_projectFront-door project health/context tool for MCP clients. Refreshes metadata/index by default and returns block, app, dashboard, semantic, catalog, and recommended-next-step status, plus the certified blocks with their grains. Next step: ask_dql with the user's question.| Parameter | Type | Description |
|---|---|---|
| refresh | boolean | Refresh metadata and agent index before returning status. Default true. |
inspect_metadata_contextBuild the local SQLite metadata context pack for a question. Use before Tier-2 SQL generation to inspect certified blocks, semantic metrics, DQL terms/views, dbt/warehouse objects, lineage edges, diagnostics, selected evidence, rejected candidates, and trust labels.| Parameter | Type | Description |
|---|---|---|
| focusObjectKey | string | Optional object key, such as dql:block:Revenue or semantic:metric:revenue. |
| includeDiagnostics | boolean | Return the full retrieval diagnostics and every object payload (large; for debugging retrieval). Default false: a compact pack with everything needed to write SQL. |
| limit | number | Maximum selected objects in the context pack. Default 100. |
| objectTypes | array | Optional metadata object type filter. |
| question * | string | User question to ground in the local SQLite metadata catalog. |
| strictness | string | Retrieval depth. Use exploratory for deep research; it widens context when limit is omitted. |
inspect_runtime_schemaInspect runtime table and column context for an arbitrary analytics question. Use this before writing new SQL when no certified block directly answers the question.| Parameter | Type | Description |
|---|---|---|
| question * | string | The user question or analytical task to inspect schema for. |
kg_searchSearch the DQL knowledge graph across business terms, business views, blocks, apps, dashboards, notebooks, semantic objects, and dbt/source metadata.| Parameter | Type | Description |
|---|---|---|
| domain | string | Filter to a single business domain. |
| kinds | array | Optional KG node-kind filter. |
| limit | number | Max hits. Default 10. |
| query * | string | Natural-language or keyword query. |
lineage_impactReturn upstream/downstream lineage for a block, metric, or model.| Parameter | Type | Description |
|---|---|---|
| downstreamDepth | number | |
| edgeLimit | number | Maximum lineage edges to return. Default 120. |
| focus * | string | Node id, such as block:revenue, or a bare name. |
| nodeLimit | number | Maximum lineage nodes to return. Default 80. |
| nonSemantic | boolean | With recert, treat the change as non-semantic. |
| pathLimit | number | Maximum complete paths per direction when paths=true. Default 20. |
| paths | boolean | Include full source-to-leaf paths. |
| recert | boolean | Return re-certification impact for a changed block. |
| upstreamDepth | number |
list_appsList the Apps (dashboards) in this project with their dashboards and tiles: each tile's title, the block it runs, that block's certification status, and the trust label the tile carries. Read-only; runs no query.| Parameter | Type | Description |
|---|---|---|
| query | string | Optional text matched against App id, name, description, domain, and tags. |
list_datasetsList current approved governed App Datasets available to the local Dataset runtime (warehouse tables approved for App tiles). Returns source identity, capability, lifecycle, and trust metadata only; it does not execute SQL. Not the way to answer a business question: call ask_dql for that. An empty list does not mean the project has no governed answers; when it has certified blocks or semantic metrics, the result says so with nextTool ask_dql.| Parameter | Type | Description |
|---|---|---|
| query | string | Optional title or domain search text. |
| serverUrl | string | Optional local DQL runtime base URL. |
list_dimensionsList semantic-layer dimensions, optionally filtered by domain.| Parameter | Type | Description |
|---|---|---|
| domain | string | Filter to a single domain. |
list_hintsList scoped correction hints, optionally filtered by lifecycle status, domain, or metric. Approved hints are folded into future Tier-2 drafts after certified routing.| Parameter | Type | Description |
|---|---|---|
| domain | string | Filter to a single domain scope. |
| metric | string | Filter to a single metric scope. |
| status | string | Filter by lifecycle status. |
list_metricsList semantic-layer metrics, optionally filtered by domain.| Parameter | Type | Description |
|---|---|---|
| domain | string | Filter to a single domain. |
list_notebook_datasetsList imported and staged notebook datasets using metadata only. Use before proposing local or mixed-source analysis. Never returns complete file contents.list_notebooksList the notebooks in this project with their cells (markdown text and SQL/DQL source). Pass path to read one notebook in full. Read-only; runs no cell.| Parameter | Type | Description |
|---|---|---|
| path | string | Optional notebook path relative to the project, e.g. notebooks/welcome.dqlnb, to return only that notebook with full cell text. |
| query | string | Optional text matched against notebook path, title, and description. |
list_proposalsList Tier-2 block drafts, semantic metric drafts, and semantic recertification proposals ordered by askedTimes DESC. Use this to prioritize recurring questions and composted metrics for certification.| Parameter | Type | Description |
|---|---|---|
| askedAtLeastTimes | number | Filter to drafts asked at least N times. Default 1. |
| since | string | ISO 8601 timestamp; only return drafts whose last_asked is on or after this. |
preview_queryRun candidate SQL against the real warehouse with a small row limit and get back the COLUMN NAMES it produced, plus whether it executed. Use this to confirm a query compiles and to learn the exact output column names before composing the final answer. Returns no cell values.| Parameter | Type | Description |
|---|---|---|
| sql * | string | A single read-only SELECT or WITH statement. |
preview_tile_queryValidate a typed TileQuery against one current governed App Dataset before execution. The server resolves source identity and approved capability; SQL and client trust claims are not accepted.| Parameter | Type | Description |
|---|---|---|
| parameters | object | Optional values for parameters declared by this Dataset only. |
| query * | any | |
| serverUrl | string | Optional local DQL runtime base URL. |
| sourceId * | string | Exact governed Dataset source id returned by list_datasets. |
propose_cross_source_joinCompare dataset schemas and propose join keys/cardinality warnings. If multiple plausible keys or a many-to-many risk exists, returns clarificationRequired=true instead of guessing.| Parameter | Type | Description |
|---|---|---|
| left * | string | |
| right * | string |
query_certified_blockExecute a certified DQL block by name through the local governed runtime. Use this when a certified block exactly answers the question.| Parameter | Type | Description |
|---|---|---|
| limit | number | Maximum rows to return in the tool result. Default 200. |
| name * | string | Certified DQL block name to execute. |
| parameters | object | Explicit typed values for the certified block parameters. |
| question | string | Original user question used to resolve typed block parameters. |
query_datasetExecute a typed TileQuery through the same governed App Dataset runtime used by App Builder. Returns current result, trust, and source/query/target receipt fingerprints. It creates no App, draft, story, or publication evidence.| Parameter | Type | Description |
|---|---|---|
| parameters | object | Optional values for parameters declared by this Dataset only. |
| query * | any | |
| serverUrl | string | Optional local DQL runtime base URL. |
| sourceId * | string | Exact governed Dataset source id returned by list_datasets. |
query_semantic_modelSemantic-layer compiler and bounded preview runner. Use only after ask_dql returned no certified block, when a governed metric/dimension/time-grain selection can answer the question before deep dbt/warehouse SQL search. When a certified block already answers the requested metric and grain, the result names it under certifiedBlock with nextTool query_via_block. Accepts explicit semantic members or a question, returns selected members, compiled SQL, bounded preview rows when runtime execution is available, and a reviewable DQL semantic artifact. Labelled From Metrics when every join it takes is a certified relationship (or it takes none), AI-Generated when a join is a draft or unmodeled relationship (relationshipProof lists the joins). uncertified: true means no certified block backs the result, not that it is AI-generated; report trustLabelInfo.display.| Parameter | Type | Description |
|---|---|---|
| dimensions | array | Semantic dimensions to group by. |
| driver | string | Optional SQL driver/dialect hint, such as duckdb, snowflake, bigquery, or postgres. |
| dryRun | boolean | Return the semantic DQL artifact and compiled SQL without runtime execution. Default false. |
| filters | array | Optional semantic filters to compile through the semantic layer. |
| limit | number | Optional result limit for the compiled semantic query. |
| metrics | array | Semantic metric names to compile. When supplied, these are used directly instead of question-based member selection. |
| orderBy | array | Optional semantic order by clauses. |
| parameters | object | Explicit values for the certified block's declared runtime parameters. Values may not alter metrics, dimensions, joins, or output shape. |
| question | string | Business question to map to semantic-layer members when metrics are not supplied explicitly. |
| rowLimit | number | Maximum rows returned from bounded preview execution. Default 200. Does not change the semantic query limit. |
| saveDraft | boolean | Persist the generated semantic DQL artifact to blocks/_drafts for review. Default true. |
| serverUrl | string | Base URL of the local DQL runtime for preview execution. Default http://127.0.0.1:3474. |
| tableMapping | object | Optional mapping from semantic table names to physical database relations. |
| timeDimension | object | Optional semantic time dimension and granularity such as {name:"order_date", granularity:"month"}. |
query_via_blockTier-1 of graduated trust. Execute a certified saved query (block) against the local DQL runtime when the block grain exactly answers the user question. For named-entity filters, custom rankings, breakdowns, comparisons, or drill-throughs, use the block as context and call query_via_metadata instead.| Parameter | Type | Description |
|---|---|---|
| limit | number | Max rows to return. Default 200. |
| name * | string | Certified block to execute. |
| parameters | object | Typed runtime parameter values resolved from the question, prior result, or an explicit user input. |
| question | string | Original question. Enables a defense-in-depth grain gate before serving the block. |
| serverUrl | string | Base URL of the local DQL runtime. Default http://127.0.0.1:3474. |
query_via_metadataTier-2 of graduated trust. Use when no certified block exactly answers the requested grain, including named filters, rankings, breakdowns, comparisons, anomalies, and drill-throughs. Call inspect_metadata_context first and pass its contextPackId. If proposedSql is omitted, this returns the catalog route plan and allowed SQL context. If proposedSql is supplied, it must be one read-only SELECT/WITH query using only inspected relations/columns. The runtime executes a bounded preview, returns uncertified trust evidence, and saves a reviewable DQL draft.| Parameter | Type | Description |
|---|---|---|
| contextPackId | string | Context-pack id returned by inspect_metadata_context. |
| dryRun | boolean | Return proposal only without execution. Default false. |
| followUp | object | |
| intent | string | Optional deep-research intent. |
| limit | number | Max rows to return on execution. |
| outputs | array | Declared output column names returned by the proposed SQL and written into the DQL draft. |
| proposedDomain | string | Best guess at the DataLex domain that owns this question. |
| proposedEntity | string | Best guess at the owning entity, such as Customer. |
| proposedSql | string | Read-only SELECT/WITH SQL inferred from inspected metadata context. |
| question * | string | The user question being answered, verbatim. |
| regroundAttemptsUsed | number | Number of expand_context re-ground attempts already used for this query. Pass 1 when retrying with an expanded context pack. |
| saveDraft | boolean | Persist a draft .dql file. Default true. |
| serverUrl | string | Base URL of the local DQL runtime. Default http://127.0.0.1:3474. |
| upstreamRefs | array | Tables or blocks involved in the proposed SQL. |
record_correctionCapture an analyst correction of a Tier-2 generated answer as a scoped, Git-versioned candidate hint. The hint is not used until approved.| Parameter | Type | Description |
|---|---|---|
| anchorObjectKey | string | Context pack, block, or object id the correction anchored to. |
| author | string | Who recorded the correction. |
| correctedSql | string | Canonical corrected SQL. Required before a dbt-first v3 candidate can be approved. |
| correction * | string | The analyst correction: corrected SQL, rule, or guidance. |
| hintGuidance | string | Override the hint guidance. |
| hintTitle | string | Override the derived hint title. |
| lesson | object | Structured reusable experience. The approved rule remains advisory to current governed truth. |
| question * | string | The analyst question the Tier-2 answer was for. |
| rationale | string | Why the original answer was wrong. |
| scope * | any | |
| tags | array | Searchable keywords. |
| wrongAnswer * | string | The generated answer or SQL that was wrong. |
resolve_analytical_pathResolve a deterministic manifest-v3 analytical path before generating SQL. Returns exact certified relationships, key pairs, fanout policy, and cross-domain interfaces, or a clarification/refusal reason.| Parameter | Type | Description |
|---|---|---|
| dimensionEntities | array | Entities contributing grouping dimensions. |
| entities * | array | Analytical entities to connect: qualified ids such as commerce::entity::order, or bare entity names such as order when only one domain has that entity. An unknown name returns the available entity ids. |
| measureEntities | array | Entities contributing additive measures. |
| ownerDomain | string | Domain that owns the proposed analysis. |
| purpose | string | Declared cross-domain analytical purpose. |
sample_notebook_datasetReturn a strictly bounded, redacted sample from a notebook dataset. Use only when schema/profile is insufficient. Sensitive columns are always redacted.| Parameter | Type | Description |
|---|---|---|
| id * | string | |
| limit | number |
scan_manifestGrep-style, index-independent scan over the live project graph (certified blocks, metrics, dimensions, dbt models). Returns objects whose name/description/context contains ALL query terms, then ANY. Use when FTS search misses or you want a fresh, ranking-free lookup.| Parameter | Type | Description |
|---|---|---|
| kinds | array | Optional node-kind filter, e.g. ["block","metric","dimension","dbt_model"]. Default all. |
| limit | number | Max results. Default 20. |
| query * | string | Terms to scan for, e.g. "tax region product". |
searchSearch pages| Parameter | Type | Description |
|---|---|---|
| query * | string |
search_blocksFind saved queries (blocks), certified and draft, by keyword, domain, or status. Each result carries its status; only a certified saved query is a certified answer.| Parameter | Type | Description |
|---|---|---|
| domain | string | Filter to a single business domain. |
| limit | number | Max results. Default 50. |
| query | string | Substring matched against name, description, or tags. |
| status | string | Filter by certification status. |
search_metadataGrounded-SQL retrieval: rank tables relevant to a request (dbt models, or the synced warehouse catalog in a project without dbt) and return each table qualified relation and ref form. Use before writing SQL so you reference the real relation, never a bare model name.| Parameter | Type | Description |
|---|---|---|
| limit | number | Max tables to return. Default 12. |
| query * | string | Natural-language request to find relevant tables for. |
search_project_filesFast bounded ripgrep over the live DQL/dbt source tree. Use only when catalog and semantic search missed a likely block, metric, dimension, model, or join definition. Returns source paths and matching lines; it never executes or mutates files.| Parameter | Type | Description |
|---|---|---|
| limit | number | Maximum matching lines. Default 40, maximum 100. |
| query * | string | Business terms or identifiers to find in DQL, SQL, YAML, JSON, and Markdown sources. |
search_semantic_layerSearch the governed semantic layer for metrics and dimensions matching a question. Returns member NAMES to pass to compile_semantic_query, with labels, descriptions, and backing tables. Use this before compile_semantic_query.| Parameter | Type | Description |
|---|---|---|
| limit | number | Max members per kind. Default 8. |
| query * | string | Natural-language terms, e.g. "tax by region and product". |
suggest_blockWrite a curated proposed saved query (block) to the local draft queue with a hand-shaped name and structure, plus the governance gate result. Use when proposing a shared building block; for one-shot ad-hoc Tier-2 captures, use query_via_metadata instead.| Parameter | Type | Description |
|---|---|---|
| chartType | string | Optional visualization type. |
| description * | string | One-line description. |
| domain * | string | Business domain. |
| name * | string | Proposed block name. |
| owner * | string | Block owner identity. |
| sql * | string | The block body SQL. |
| tags | array |
update_pageChange a page| Parameter | Type | Description |
|---|---|---|
| id | string |
validate_sqlValidate that a read-only SELECT/WITH query references only relations and columns that exist (in the dbt schema, or the synced warehouse catalog in a project without dbt) and only governed joins. Returns the precise offending table or column on a miss.| Parameter | Type | Description |
|---|---|---|
| query | string | Optional original request, used to scope grounding. |
| sql * | string | A read-only SELECT/WITH query to validate against the dbt schema. |
Security checks
From the duckcode-ai-labs/zlens monorepo, not this package alone.
- ✓README presentThe repository's README runs to about 867 words.
5 checks have not been run yet.
README
The repository's README runs to about 867 words. The original in the repository is authoritative.
Read full README