> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nodaldata.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Tool reference

> The tools the hosted Nodal MCP endpoint exposes, grouped by connector.

The Nodal MCP endpoint (`https://analyst.nodaldata.io/mcp`) exposes its tools in three connector
groups. Together they let an agent retrieve the right definitions and canonical queries for a
question and return a governed answer grounded in verified context. Every tool is scoped to your
organization and returns a JSON string.

<Note>
  None of these tools touch your database. They read your **context** and **dbt** repos and the Query
  Hub; SQL execution stays with your own warehouse connector. See
  [what Nodal can access](/mcp/data-access).
</Note>

## Business context connector

Reads your analyst-curated context repo — business domains, entities, metrics, terminology, and
known data caveats.

<ResponseField name="get_business_context()" type="no parameters">
  Overview of your context repo: domains, entities, metrics, terminology, and known caveats, with
  files prefetched into cache. Call this first when a question involves what a term or metric means,
  which domain owns something, a domain's grain, or known data caveats.
</ResponseField>

<ResponseField name="search_business_context(pattern, file_filter?)" type="regex search">
  Regex search across the cached context files. `pattern` is a regex (e.g. `"grain:"`);
  `file_filter` is an optional glob (e.g. `"*.yaml"`).
</ResponseField>

<ResponseField name="read_business_context_file(path)" type="read one file">
  Read a single context file, e.g. `"domains/appointments/context.md"`.
</ResponseField>

<ResponseField name="list_business_context_files(path?)" type="browse tree">
  List files and directories in the context repo. Empty `path` lists the root.
</ResponseField>

## dbt / lineage connector

Optional. If you connect your dbt repo, these expose your models and docs so the agent can check
*how* a metric is computed.

<ResponseField name="get_dbt_context()" type="no parameters">
  The dbt project overview: `dbt_project.yml` config, all `schema.yml` documentation, and the list
  of SQL models and macros. Call this first to understand your data models and lineage.
</ResponseField>

<ResponseField name="search_dbt_code(pattern, file_filter?)" type="regex search">
  Regex search across cached dbt files. `pattern` is a regex (e.g. `"customer_id"`); `file_filter`
  is an optional glob (e.g. `"*.sql"`).
</ResponseField>

<ResponseField name="read_dbt_file(path)" type="read one file">
  Read a single file from the dbt repo, e.g. `"models/staging/stg_customers.sql"`.
</ResponseField>

<ResponseField name="list_dbt_files(path?)" type="browse tree">
  List files and directories in the dbt repo. Empty `path` lists the root.
</ResponseField>

## Query Hub connector

The Query Hub is your growing source of truth: verified SQL templates and resolved definitions that
turn a business question into a governed answer.

<ResponseField name="search_corpus(question)" type="semantic search">
  Semantic search over the Query Hub corpus for questions similar to the input. Returns ranked
  matches with similarity scores, validated SQL templates, tables used, and filter values — use it
  to discover relevant prior analyses before writing new SQL.
</ResponseField>

<ResponseField name="check_entity_resolution(question)" type="resolve entities">
  Extract and resolve the business entities, metrics, and temporal references in a question.
  Returns resolutions with confidence, column references, and SQL expressions (including competing
  resolutions where a term is ambiguous).
</ResponseField>

<ResponseField name="interrogate_question(question)" type="clarify a vague question">
  Turn a vague question into a fully-specified canonical question: the matched metric, parameter
  resolutions (user-stated vs. defaulted), implicit filters, confidence, and any clarifications
  needed. Does **not** return SQL — it separates clarification from execution. Returns a top-level
  `nodal_session_id` to thread onto later calls and into `commit_plan`.
</ResponseField>

<ResponseField name="commit_plan(nodal_session_id, ...)" type="record a plan">
  Persist the plan and assumptions assembled for an interrogation session — an audit trail (one row
  per call), joined to the session by `nodal_session_id`. Optional fields include `plan_markdown`,
  `user_approved`, `confidence_score`, `clarifications_surfaced` / `clarifications_resolved`,
  `dbt_models_consulted`, `business_context_consulted`, and `assumptions`. Best-effort: it must
  never block the user.
</ResponseField>

## Resource

<ResponseField name="aiden://template-catalog" type="MCP resource">
  Lists the pre-written, verified SQL templates available for your organization.
</ResponseField>
