Skip to main content
Glama

dbt_deps

Install or update external package dependencies for a dbt project to ensure required modules, macros, and models are available before execution.

Instructions

Install dbt package dependencies. An AI agent should use this tool when it needs to install or update external packages that the dbt project depends on. This ensures that all required modules, macros, and models from other packages are available before running the project.

Returns: Output from the dbt deps command as text (this command does not support JSON output format)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_dirNoABSOLUTE PATH to the directory containing the dbt project (e.g. '/Users/username/projects/dbt_project' not '.').
profiles_dirNoDirectory containing the profiles.yml file (defaults to project_dir if not specified)

Implementation Reference

  • The primary handler function for the 'dbt_deps' MCP tool. It defines the input schema with Pydantic Field descriptions, executes the 'dbt deps' command, and processes the result.
    @mcp.tool() async def dbt_deps( project_dir: str = Field( default=".", description="ABSOLUTE PATH to the directory containing the dbt project (e.g. '/Users/username/projects/dbt_project' not '.')" ), profiles_dir: Optional[str] = Field( default=None, description="Directory containing the profiles.yml file (defaults to project_dir if not specified)" ) ) -> str: """Install dbt package dependencies. An AI agent should use this tool when it needs to install or update external packages that the dbt project depends on. This ensures that all required modules, macros, and models from other packages are available before running the project. Returns: Output from the dbt deps command as text (this command does not support JSON output format) """ command = ["deps"] # The --no-print flag is not supported by dbt Cloud CLI # We'll rely on proper parsing to handle any print macros result = await execute_dbt_command(command, project_dir, profiles_dir) # Use the centralized result processor return await process_command_result(result, command_name="deps")
  • src/server.py:88-90 (registration)
    Registers all MCP tools including 'dbt_deps' by calling register_tools(mcp) on the FastMCP server instance.
    # Register tools register_tools(mcp)
  • src/tools.py:25-31 (registration)
    The register_tools function that defines and registers all MCP tools via @mcp.tool() decorators, including dbt_deps.
    def register_tools(mcp: FastMCP) -> None: """ Register all tools with the MCP server. Args: mcp: The FastMCP server instance """

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/MammothGrowth/dbt-cli-mcp'

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