Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_project_info | Get information about the dbt project with optional diagnostics. Args:
run_debug: Run Returns: Dictionary with project information and diagnostic results |
| list_resources | List all resources in the dbt project with optional filtering by type. This unified tool provides a consistent view across all dbt resource types. Returns simplified resource information optimized for LLM consumption. Args: resource_type: Optional filter to narrow results: - "model": Data transformation models - "source": External data sources - "seed": CSV reference data files - "snapshot": SCD Type 2 historical tables - "test": Data quality tests - "analysis": Ad-hoc analysis queries - "macro": Jinja macros (includes macros from installed packages) - None: Return all resources (default) Returns: List of resource dictionaries with consistent structure across types. Each resource includes: name, unique_id, resource_type, description, tags, etc. Package Discovery: Use resource_type="macro" to discover installed dbt packages. Macros follow the naming pattern: macro.{package_name}.{macro_name} Example - Check if dbt_utils is installed:
macros = list_resources("macro")
has_dbt_utils = any(m["unique_id"].startswith("macro.dbt_utils.") for m in macros)
Example - List all installed packages:
macros = list_resources("macro")
packages = {m["unique_id"].split(".")[1] for m in macros
if m["unique_id"].startswith("macro.") and
m["unique_id"].split(".")[1] != "dbt"} Examples: list_resources() -> all resources list_resources("model") -> only models list_resources("source") -> only sources list_resources("test") -> only tests list_resources("macro") -> all macros (discover installed packages) |
| get_resource_info | Get detailed information about any dbt resource (model, source, seed, snapshot, test, etc.). This unified tool works across all resource types, auto-detecting the resource or filtering by type. Designed for LLM consumption - returns complete data even when multiple matches exist. Args: name: Resource name. For sources, use "source_name.table_name" or just "table_name" resource_type: Optional filter to narrow search: - "model": Data transformation models - "source": External data sources - "seed": CSV reference data files - "snapshot": SCD Type 2 historical tables - "test": Data quality tests - "analysis": Ad-hoc analysis queries - None: Auto-detect (searches all types) include_database_schema: If True (default), query actual database table schema for models/seeds/snapshots/sources and add as 'database_columns' field include_compiled_sql: If True (default), include compiled SQL with Jinja resolved ({{ ref() }}, {{ source() }} → actual table names). Only applicable to models. Will trigger dbt compile if not already compiled. Set to False to skip compilation. Returns: Resource information dictionary. If multiple matches found, returns: {"multiple_matches": True, "matches": [...], "message": "..."} Raises: ValueError: If resource not found Examples: get_resource_info("customers") -> auto-detect model or source get_resource_info("customers", "model") -> get model only get_resource_info("jaffle_shop.customers", "source") -> specific source get_resource_info("test_unique_customers") -> find test get_resource_info("customers", include_compiled_sql=True) -> include compiled SQL |
| get_lineage | Get lineage (dependency tree) for any dbt resource with auto-detection. This unified tool works across all resource types (models, sources, seeds, snapshots, etc.) showing upstream and/or downstream dependencies with configurable depth. Args: name: Resource name. For sources, use "source_name.table_name" or just "table_name" Examples: "customers", "jaffle_shop.orders", "raw_customers" resource_type: Optional filter to narrow search: - "model": Data transformation models - "source": External data sources - "seed": CSV reference data files - "snapshot": SCD Type 2 historical tables - "test": Data quality tests - "analysis": Ad-hoc analysis queries - None: Auto-detect (searches all types) direction: Lineage direction: - "upstream": Show where data comes from (parents) - "downstream": Show what depends on this resource (children) - "both": Show full lineage (default) depth: Maximum levels to traverse (None for unlimited) - depth=1: Immediate dependencies only - depth=2: Dependencies + their dependencies - None: Full dependency tree Returns: Lineage information with upstream/downstream nodes and statistics. If multiple matches found, returns all matches for LLM to process. Raises: ValueError: If resource not found or invalid direction Examples: get_lineage("customers") -> auto-detect and show full lineage get_lineage("customers", "model", "upstream") -> where customers model gets data get_lineage("jaffle_shop.orders", "source", "downstream", 2) -> 2 levels of dependents |
| analyze_impact | Analyze the impact of changing any dbt resource with auto-detection. This unified tool works across all resource types (models, sources, seeds, snapshots, etc.) showing all downstream dependencies that would be affected by changes. Provides actionable recommendations for running affected resources. Args: name: Resource name. For sources, use "source_name.table_name" or just "table_name" Examples: "stg_customers", "jaffle_shop.orders", "raw_customers" resource_type: Optional filter to narrow search: - "model": Data transformation models - "source": External data sources - "seed": CSV reference data files - "snapshot": SCD Type 2 historical tables - "test": Data quality tests - "analysis": Ad-hoc analysis queries - None: Auto-detect (searches all types) Returns: Impact analysis with: - List of affected models by distance - Count of affected tests and other resources - Total impact statistics - Resources grouped by distance from changed resource - Recommended dbt command to run affected resources - Human-readable impact assessment message If multiple matches found, returns all matches for LLM to process. Raises: ValueError: If resource not found Examples: analyze_impact("stg_customers") -> auto-detect and show impact analyze_impact("jaffle_shop.orders", "source") -> impact of source change analyze_impact("raw_customers", "seed") -> impact of seed data change |
| query_database | Execute a SQL query against the dbt project's database. BEST PRACTICES:
QUERY EFFICIENCY:
LARGE RESULT HANDLING:
OUTPUT FORMATS:
Args: sql: SQL query with Jinja templating: {{ ref('model') }}, {{ source('src', 'table') }} For exploratory queries, include LIMIT. For aggregations/counts, omit it. output_file: Optional file path to save results. Recommended for large result sets (>100 rows). If provided, only metadata is returned (no preview for CSV/TSV). If omitted, all data is returned inline (may consume large context). output_format: Output format - "json" (default), "csv", or "tsv" Returns: JSON inline: {"status": "success", "row_count": N, "rows": [...]} JSON file: {"status": "success", "row_count": N, "saved_to": "path", "preview": [...]} CSV/TSV inline: {"status": "success", "row_count": N, "format": "csv", "csv": "..."} CSV/TSV file: {"status": "success", "row_count": N, "format": "csv", "saved_to": "path"} |
| run_models | Run dbt models (compile SQL and execute against database). State-based selection modes (uses dbt state:modified selector):
Manual selection (alternative to state-based):
Args: select: Manual selector (e.g., "customers", "tag:mart", "path:marts/*") exclude: Exclude selector (e.g., "tag:deprecated") select_state_modified: Use state:modified selector (changed models only) select_state_modified_plus_downstream: Extend to state:modified+ (changed + downstream) full_refresh: Force full refresh of incremental models fail_fast: Stop execution on first failure check_schema_changes: Detect schema changes and recommend downstream runs Returns: Execution results with status, models run, timing info, and optional schema_changes Examples: - run_models(select="customers") - Run specific model - run_models(select_state_modified=True) - Run only what changed - run_models(select_state_modified=True, select_state_modified_plus_downstream=True) - Run changed + downstream - run_models(select="tag:mart", full_refresh=True) - Full refresh marts - run_models(select_state_modified=True, check_schema_changes=True) - Detect schema changes |
| test_models | Run dbt tests on models and sources. State-based selection modes (uses dbt state:modified selector):
Manual selection (alternative to state-based):
Args: select: Manual selector for tests/models to test exclude: Exclude selector select_state_modified: Use state:modified selector (changed models only) select_state_modified_plus_downstream: Extend to state:modified+ (changed + downstream) fail_fast: Stop execution on first failure Returns: Test results with status and failures |
| build_models | Run DBT build (run + test in DAG order). State-based selection modes (uses dbt state:modified selector):
Manual selection (alternative to state-based):
Args: select: Manual selector exclude: Exclude selector select_state_modified: Use state:modified selector (changed models only) select_state_modified_plus_downstream: Extend to state:modified+ (changed + downstream) full_refresh: Force full refresh of incremental models fail_fast: Stop execution on first failure Returns: Build results with status, models run/tested, and timing info |
| seed_data | Load seed data (CSV files) from seeds/ directory into database tables. Seeds are typically used for reference data like country codes, product categories, etc. State-based selection modes (detects changed CSV files):
Manual selection (alternative to state-based):
Important: Change detection for seeds works via file hash comparison:
Args: select: Manual selector for seeds exclude: Exclude selector select_state_modified: Use state:modified selector (changed seeds only) select_state_modified_plus_downstream: Extend to state:modified+ (changed + downstream) full_refresh: Truncate and reload seed tables (default behavior) show: Show preview of loaded data Returns: Seed results with status and loaded seed info Examples: seed_data() # Load all seeds seed_data(select_state_modified=True) # Load only changed CSVs seed_data(select="raw_customers") # Load specific seed |
| snapshot_models | Execute dbt snapshots to capture slowly changing dimensions (SCD Type 2). Snapshots track historical changes over time by recording:
Unlike models and seeds, snapshots are time-based and should be run on a schedule (e.g., daily or hourly), not during interactive development. Args: select: dbt selector syntax (e.g., "snapshot_name", "tag:daily") exclude: Exclude specific snapshots Returns: Snapshot results with status and captured changes Examples: snapshot_models() # Run all snapshots snapshot_models(select="customer_history") # Run specific snapshot snapshot_models(select="tag:hourly") # Run snapshots tagged 'hourly' Note: Snapshots do not support state-based selection (select_state_modified*) because they are time-dependent, not change-dependent. |
| install_deps | Install dbt packages defined in packages.yml. This tool enables interactive workflow where an LLM can:
This completes the recommendation workflow without breaking conversation flow. Returns: Installation results with status and installed packages Example workflow: User: "Create a date dimension table" LLM: 1. Checks: list_resources(type="macro") -> no dbt_utils 2. Edits: packages.yml (adds dbt_utils package) 3. Runs: install_deps() (installs package) 4. Creates: models/date_dim.sql (uses dbt_utils.date_spine) Note: This is an interactive development tool, not infrastructure automation. It enables the LLM to act on its own recommendations mid-conversation. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |