The dbt connector lets your AI agent act in each user's dbt account. Each user connects their own dbt access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 22 tools.
- Tools
- 22
- What they doRead · write · destructive
- 17 · 3 · 217 read3 write2 destructive
- Users sign in with
- Access token
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the dbt connection
In AgentKit > Connections, create a dbt connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'dbtcloud'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize dbt:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'dbtcloud_accounts_list',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "dbtcloud"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize dbt:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="dbtcloud_accounts_list",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user opens the link once and enters their dbt credentials there. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_tooldbtcloud_account_getGet one dbt account by ID.Read-onlyGet Account
Get one dbt account by ID. Returns its name, plan, state, run_slots, developer seat counts and settings. Use this to check an account's plan and limits. Use dbtcloud_accounts_list to find account IDs.
Inputs
account_idintegerrequired- Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
dbtcloud_accounts_listList the dbt accounts the token can access.Read-onlyList Accounts
List the dbt accounts the token can access. Returns each account's id, name, plan, state and run_slots. Use this to find the account_id every other dbt tool needs.
Inputs
This tool takes no inputs.
dbtcloud_environment_getGet one dbt environment by ID.Read-onlyGet Environment
Get one dbt environment by ID. Returns its name, type, deployment_type, dbt_version, custom_branch and credentials reference. Use this when you know the environment_id. Use dbtcloud_environments_list to browse.
Inputs
account_idintegerrequired- Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
environment_idintegerrequired- ID of the environment. Example: 218762
project_idintegerrequired- ID of the dbt project. Get it from dbtcloud_projects_list. Example: 270542
dbtcloud_environment_variables_listList the environment variables of a dbt project with their value in each environment.Read-onlyList Environment Variables
List the environment variables of a dbt project with their value in each environment. Returns each variable name with its project default and per-environment values; secret values are masked. Use this to see how a project is configured across environments.
Inputs
account_idintegerrequired- Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
project_idintegerrequired- ID of the dbt project. Get it from dbtcloud_projects_list. Example: 270542
dbtcloud_environments_listList the environments of a dbt project.Read-onlyList Environments
List the environments of a dbt project. Returns each environment's id, name, type (development or deployment), deployment_type (production or staging), dbt_version and custom_branch. Use this to find an environment_id for filtering jobs and runs.
Inputs
account_idintegerrequired- Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
project_idintegerrequired- ID of the dbt project. Get it from dbtcloud_projects_list. Example: 270542
deployment_typestring- Only environments of this deployment type: production or staging. Example: productionone of
productionstaging limitinteger- Maximum number of environments to return, up to 100. Example: 25
offsetinteger- Number of environments to skip, for paging. Example: 25
dbtcloud_job_getGet one dbt job by ID.Read-onlyGet Job
Get one dbt job by ID. Returns its name, environment, execute_steps (dbt commands), triggers, schedule, settings and the most recent runs when requested. Use this to inspect a job before running it.
Inputs
account_idintegerrequired- Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
job_idintegerrequired- ID of the job. Get it from dbtcloud_jobs_list. Example: 43167
include_relatedstring- Related objects to include, comma-separated: most_recent_run, most_recent_completed_run. Example: most_recent_run
dbtcloud_jobs_listList the jobs in a dbt account, optionally for one project or environment.Read-onlyList Jobs
List the jobs in a dbt account, optionally for one project or environment. Returns each job's id, name, project_id, environment_id, execute_steps, triggers, schedule and state. Use this to find a job_id before dbtcloud_job_run. Use dbtcloud_job_get for one job.
Inputs
account_idintegerrequired- Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
environment_idinteger- Only jobs in this environment. Example: 218762
limitinteger- Maximum number of jobs to return, up to 100. Example: 25
name_containsstring- Only jobs whose name contains this text (case-insensitive). Example: nightly
offsetinteger- Number of jobs to skip, for paging. Example: 25
order_bystring- Field to sort by; prefix with - for descending. Example: -id
project_idinteger- Only jobs in this project. Example: 270542
dbtcloud_project_getGet one dbt project by ID.Read-onlyGet Project
Get one dbt project by ID. Returns its name, description, connection, repository, environments and dbt_project_subdirectory. Use this when you know the project_id. Use dbtcloud_projects_list to browse.
Inputs
account_idintegerrequired- Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
project_idintegerrequired- ID of the dbt project. Get it from dbtcloud_projects_list. Example: 270542
dbtcloud_projects_listList the projects in a dbt account.Read-onlyList Projects
List the projects in a dbt account. Returns each project's id, name, connection, repository, dbt_project_subdirectory and state. Use this to find a project_id. Use dbtcloud_project_get for one project.
Inputs
account_idintegerrequired- Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
limitinteger- Maximum number of projects to return, up to 100. Example: 25
name_containsstring- Only projects whose name contains this text (case-insensitive). Example: analytics
offsetinteger- Number of projects to skip, for paging. Example: 25
dbtcloud_repositories_listList the Git repositories connected to a dbt project.Read-onlyList Repositories
List the Git repositories connected to a dbt project. Returns each repository's id, remote_url, git_clone_strategy and state. Use this to see which repository a project builds from.
Inputs
account_idintegerrequired- Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
project_idintegerrequired- ID of the dbt project. Get it from dbtcloud_projects_list. Example: 270542
limitinteger- Maximum number of repositories to return, up to 100. Example: 25
offsetinteger- Number of repositories to skip, for paging. Example: 25
dbtcloud_run_artifact_getDownload one artifact file from a dbt run, such as run_results.json or manifest.json.Read-onlyGet Run Artifact
Download one artifact file from a dbt run, such as run_results.json or manifest.json. Returns the file content; JSON artifacts come back as JSON text. Use this to read test results or model metadata. manifest.json can be many megabytes; prefer run_results.json for results.
Inputs
account_idintegerrequired- Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
pathstringrequired- Artifact path from dbtcloud_run_artifacts_list. Example: run_results.json
run_idintegerrequired- ID of the job run. Get it from dbtcloud_runs_list or the response of dbtcloud_job_run. Example: 314159265
stepinteger- Step index to read the artifact from; defaults to the last step. Example: 2
dbtcloud_run_artifacts_listList the artifact files a dbt run produced.Read-onlyList Run Artifacts
List the artifact files a dbt run produced. Returns file paths such as manifest.json, run_results.json, catalog.json and sources.json. Use this to see what dbtcloud_run_artifact_get can download.
Inputs
account_idintegerrequired- Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
run_idintegerrequired- ID of the job run. Get it from dbtcloud_runs_list or the response of dbtcloud_job_run. Example: 314159265
dbtcloud_run_getGet one dbt job run by ID.Read-onlyGet Run
Get one dbt job run by ID. Returns its status, status_humanized, job, trigger, git details, timing, and with include_related=run_steps each step's command, status and logs. Use this to follow or debug a run. Use dbtcloud_run_artifact_get for manifest.json or run_results.json.
Inputs
account_idintegerrequired- Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
run_idintegerrequired- ID of the job run. Get it from dbtcloud_runs_list or the response of dbtcloud_job_run. Example: 314159265
include_relatedstring- Related objects to include, comma-separated: trigger, job, run_steps, debug_logs. Example: run_steps,job
dbtcloud_runs_listList job runs in a dbt account, newest first by default, optionally for one job, project or environment, or by status.Read-onlyList Runs
List job runs in a dbt account, newest first by default, optionally for one job, project or environment, or by status. Returns each run's id, job_definition_id, status (1 queued, 2 starting, 3 running, 10 success, 20 error, 30 cancelled), status_humanized, git_branch, created_at, finished_at and duration. Use this to check recent runs. Use dbtcloud_run_get for one run's steps.
Inputs
account_idintegerrequired- Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
environment_idinteger- Only runs in this environment. Example: 218762
job_definition_idinteger- Only runs of this job. Example: 43167
limitinteger- Maximum number of runs to return, up to 100. Example: 25
offsetinteger- Number of runs to skip, for paging. Example: 25
order_bystring- Sort field: id, created_at or finished_at; prefix with - for descending. Defaults to -id. Example: -created_atdefault
-id project_idinteger- Only runs in this project. Example: 270542
statusinteger- Only runs with this status: 1 queued, 2 starting, 3 running, 10 success, 20 error, 30 cancelled. Example: 20one of
123102030
dbtcloud_users_listList the users in a dbt account.Read-onlyList Users
List the users in a dbt account. Returns each user's id, first_name, last_name, email, license type and permissions. Use this to find who has access to an account.
Inputs
account_idintegerrequired- Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
license_typestring- Only users with this license: analyst, developer, it or read_only. Example: developerone of
analystdeveloperitread_only limitinteger- Maximum number of users to return, up to 100. Example: 25
offsetinteger- Number of users to skip, for paging. Example: 25
searchstring- Only users whose name or email matches this text. Example: alex
dbtcloud_webhook_getGet one dbt webhook subscription by ID.Read-onlyGet Webhook
Get one dbt webhook subscription by ID. Returns its name, client_url, event_types, job_ids, active flag and delivery status. Use this when you know the webhook ID.
Inputs
account_idintegerrequired- Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
subscription_idstringrequired- ID of the webhook subscription. Example: wsu_12345abcde
dbtcloud_webhooks_listList the webhook subscriptions of a dbt account.Read-onlyList Webhooks
List the webhook subscriptions of a dbt account. Returns each webhook's id, name, client_url, event_types, job_ids, active flag and last http_status_code. Use this to see where run events are sent.
Inputs
account_idintegerrequired- Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
limitinteger- Maximum number of webhooks to return, up to 100. Example: 25
offsetinteger- Number of webhooks to skip, for paging. Example: 25
dbtcloud_job_runTrigger a run of a dbt job, optionally on a different branch or with overridden dbt commands.WriteRun Job
Trigger a run of a dbt job, optionally on a different branch or with overridden dbt commands. Returns the new run with its id and status (1 queued). Use this to start a job. Use dbtcloud_run_get to follow the run and dbtcloud_run_cancel to stop it. Uses a run slot and warehouse compute.
Inputs
account_idintegerrequired- Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
causestringrequired- Short reason for the run, shown in dbt. Example: Triggered by agent after source refresh
job_idintegerrequired- ID of the job. Get it from dbtcloud_jobs_list. Example: 43167
generate_docs_overrideboolean- Whether to run dbt docs generate. Example: true
git_branchstring- Git branch to check out instead of the environment's branch. Example: feature/new-model
git_shastring- Git commit SHA to check out. Example: 9a8b7c6d
schema_overridestring- Destination schema to use instead of the target's. Example: dbt_ci_1234
steps_overridearray- dbt commands to run instead of the job's steps. Example: ["dbt build --select my_model+"]
target_name_overridestring- Value for target.name. Example: ci
threads_overrideinteger- Number of threads to use. Example: 8
timeout_seconds_overrideinteger- Run timeout in seconds. Example: 3600
dbtcloud_run_retryRetry a failed dbt job run from the point of failure.WriteRetry Failed Run
Retry a failed dbt job run from the point of failure. Returns the new run. Use this after a run errors. Use dbtcloud_job_run to start the whole job again. Uses a run slot and warehouse compute.
Inputs
account_idintegerrequired- Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
run_idintegerrequired- ID of the job run. Get it from dbtcloud_runs_list or the response of dbtcloud_job_run. Example: 314159265
dbtcloud_webhook_createCreate a webhook that posts dbt job run events to a URL.WriteCreate Webhook
Create a webhook that posts dbt job run events to a URL. Returns the new webhook, including its hmac_secret for verifying deliveries. Use this to get notified when runs start, finish or fail.
Inputs
account_idintegerrequired- Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
client_urlstringrequired- HTTPS URL the events are posted to. Example: https://hooks.example.com/dbt
event_typesarrayrequired- Events to send: job.run.started, job.run.completed and/or job.run.errored. Example: ["job.run.completed", "job.run.errored"]
namestringrequired- Name of the webhook. Example: Slack run alerts
activeboolean- Whether the webhook starts active. Defaults to true. Example: truedefault
true descriptionstring- Description of the webhook. Example: Alerts for production jobs
job_idsarray- Only send events for these job IDs; leave empty for all jobs. Example: [43167]
dbtcloud_run_cancelCancel a queued or running dbt job run.DestructiveCancel Run
Cancel a queued or running dbt job run. Returns the run with its updated status. Use this to stop a run. Use dbtcloud_run_retry to rerun a failed run.
Inputs
account_idintegerrequired- Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
run_idintegerrequired- ID of the job run. Get it from dbtcloud_runs_list or the response of dbtcloud_job_run. Example: 314159265
dbtcloud_webhook_deleteDelete a dbt webhook subscription.DestructiveDelete Webhook
Delete a dbt webhook subscription. Returns a confirmation. Use this to stop sending run events to a URL.
- Idempotent
Inputs
account_idintegerrequired- Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
subscription_idstringrequired- ID of the webhook subscription. Example: wsu_12345abcde
No tools match.