Skip to main content
Glama
NiclasOlofsson

DBT Core MCP Server

list_resources

List all resources in a dbt project or filter by type to view models, sources, seeds, snapshots, tests, analyses, or macros. Discover installed dbt packages by listing macros.

Instructions

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)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resource_typeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the full burden. It states the tool is for listing resources, returns simplified info for LLM consumption, and explains the default behavior and package discovery. It implies a read operation but does not explicitly state it is read-only or mention any prerequisites.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured with clear sections (Args, Returns, Package Discovery, Examples) and is front-loaded with the purpose. While comprehensive, it is slightly lengthy but justifiable given the need to cover package discovery and examples.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given an optional output schema (mentioned but not detailed), the description covers parameter usage, return structure, examples, and special package discovery use case. It is complete for a list tool and fits well with sibling tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There is one parameter with 0% schema coverage. The description compensates fully by listing all possible enum values with explanations, default behavior, and usage examples, making the parameter's meaning and usage very clear.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'List all resources' with optional filtering by type, using a specific verb and resource. It distinguishes from siblings like 'get_resource_info' by indicating it returns a list of all resources rather than details on a single resource.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains when to use filtering and provides examples for each resource_type. It also includes a section on package discovery with specific use cases. However, it does not explicitly mention when not to use this tool or alternatives among siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

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/NiclasOlofsson/dbt-core-mcp'

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