Skip to main content
Version: devel

dlt._workspace.mcp.tools.data_tools

list_pipelines

@with_mcp_tool_telemetry()
def list_pipelines() -> List[str]

View source on GitHub

List all dlt pipelines available in this workspace

get_workspace_info

@with_mcp_tool_telemetry()
def get_workspace_info() -> Dict[str, Any]

View source on GitHub

Get workspace info: name, directories, active profile, and config providers.

list_profiles

@with_mcp_tool_telemetry()
def list_profiles() -> List[Dict[str, Any]]

View source on GitHub

List all available workspace profiles with status flags (current, pinned, configured).

list_tables

@with_mcp_tool_telemetry()
def list_tables(pipeline_name: str) -> Dict[str, Any]

View source on GitHub

List all data tables for a pipeline.

get_table_schema

@with_mcp_tool_telemetry()
def get_table_schema(pipeline_name: str, table_name: str) -> Dict[str, Any]

View source on GitHub

Get table schema with column names, data types, and escaped sql_identifier fields.

get_table_create_sql

@with_mcp_tool_telemetry()
def get_table_create_sql(pipeline_name: str, table_name: str) -> str

View source on GitHub

Get CREATE TABLE DDL for the table in the destination's SQL dialect.

preview_table

@with_mcp_tool_telemetry()
def preview_table(
pipeline_name: str,
table_name: str,
output_format: Annotated[
TResultFormat,
Field(description="Output format: 'markdown' or 'jsonl'"),
] = "markdown"
) -> str

View source on GitHub

Get the first 10 rows from a table.

execute_sql_query

@with_mcp_tool_telemetry()
def execute_sql_query(
pipeline_name: str,
sql_select_query: Annotated[
str,
Field(
description="SQL SELECT query to execute (only SELECT is allowed)"
),
],
output_format: Annotated[
TResultFormat,
Field(description="Output format: 'markdown' or 'jsonl'"),
] = "markdown"
) -> str

View source on GitHub

Execute a read-only SQL query against the pipeline's destination dataset.

get_row_counts

@with_mcp_tool_telemetry()
def get_row_counts(
pipeline_name: str,
output_format: Annotated[
TResultFormat,
Field(description="Output format: 'markdown' or 'jsonl'"),
] = "markdown"
) -> str

View source on GitHub

Get row counts for all data tables in a pipeline.

export_schema

@with_mcp_tool_telemetry()
def export_schema(
pipeline_name: str,
schema_name: Optional[str] = None,
hide_columns: Annotated[
bool,
Field(description=
"Hide column details for better readability of large schemas"),
] = False,
output_format: Annotated[
TMcpSchemaFormat,
Field(description="Output format: 'mermaid', 'yaml', or 'dbml'"),
] = "mermaid",
save_to_file: Annotated[
Optional[str],
Field(description=(
"Save the schema to this file path instead of returning it."
" Use an absolute path (e.g. /home/user/schema.yaml).")),
] = None
) -> str

View source on GitHub

Export the pipeline schema as a diagram or structured dump.

get_local_pipeline_state

@with_mcp_tool_telemetry()
def get_local_pipeline_state(pipeline_name: str) -> Dict[str, Any]

View source on GitHub

Get pipeline state: incremental cursors, resource state, and source state.

pipeline_trace

@with_mcp_tool_telemetry()
def pipeline_trace(pipeline_name: str) -> Dict[str, Any]

View source on GitHub

Get the trace of the last pipeline run: timing, step outcomes, and errors.

This demo works on codespaces. Codespaces is a development environment available for free to anyone with a Github account. You'll be asked to fork the demo repository and from there the README guides you with further steps.
The demo uses the Continue VSCode extension.

Off to codespaces!

DHelp

Ask a question

Welcome to "Codex Central", your next-gen help center, driven by OpenAI's GPT-4 model. It's more than just a forum or a FAQ hub – it's a dynamic knowledge base where coders can find AI-assisted solutions to their pressing problems. With GPT-4's powerful comprehension and predictive abilities, Codex Central provides instantaneous issue resolution, insightful debugging, and personalized guidance. Get your code running smoothly with the unparalleled support at Codex Central - coding help reimagined with AI prowess.