Skip to main content
Glama

dbt CLI MCP Server

dbt_ls

Discover and list dbt project resources, including models, tests, and sources, to analyze project structure, dependencies, and select specific resources for operations.

Instructions

List dbt resources. An AI agent should use this tool when it needs to discover available models, tests, sources, and other resources within a dbt project. This helps the agent understand the project structure, identify dependencies, and select specific resources for other operations like running or testing.

Returns: When output_format is 'json' (default): - With verbose=False (default): returns a simplified JSON with only name, resource_type, and depends_on.nodes - With verbose=True: returns a full JSON with all resource details When output_format is 'name', 'path', or 'selector', returns plain text with the respective format.

Input Schema

NameRequiredDescriptionDefault
excludeNoModels to exclude
modelsNoSpecific models to list, using the dbt selection syntax. Note that you probably want to specify your selection here e.g. silver.fact
output_formatNoOutput format (json, name, path, or selector)json
profiles_dirNoDirectory containing the profiles.yml file (defaults to project_dir if not specified)
project_dirNoABSOLUTE PATH to the directory containing the dbt project (e.g. '/Users/username/projects/dbt_project' not '.').
resource_typeNoType of resource to list (model, test, source, etc.)
selectorNoNamed selector to use
verboseNoReturn full JSON output instead of simplified version

Input Schema (JSON Schema)

{ "properties": { "exclude": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Models to exclude", "title": "Exclude" }, "models": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Specific models to list, using the dbt selection syntax. Note that you probably want to specify your selection here e.g. silver.fact", "title": "Models" }, "output_format": { "default": "json", "description": "Output format (json, name, path, or selector)", "title": "Output Format", "type": "string" }, "profiles_dir": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Directory containing the profiles.yml file (defaults to project_dir if not specified)", "title": "Profiles Dir" }, "project_dir": { "default": ".", "description": "ABSOLUTE PATH to the directory containing the dbt project (e.g. '/Users/username/projects/dbt_project' not '.')", "title": "Project Dir", "type": "string" }, "resource_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Type of resource to list (model, test, source, etc.)", "title": "Resource Type" }, "selector": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Named selector to use", "title": "Selector" }, "verbose": { "default": false, "description": "Return full JSON output instead of simplified version", "title": "Verbose", "type": "boolean" } }, "title": "dbt_lsArguments", "type": "object" }
Install Server

Other Tools from dbt CLI MCP Server

Related Tools

    MCP directory API

    We provide all the information about MCP servers via our MCP API.

    curl -X GET 'https://glama.ai/api/mcp/v1/servers/MammothGrowth/dbt-cli-mcp'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server