The MCP Server provides tools that AI agents can use to interact with your data, files, and pipelines in Nekt.
Asking about Nekt
ask_about_nekt
Answers questions about the Nekt platform itself — features, configuration, usage, and capabilities. This tool consults Nekt’s documentation and does not query your data.
Example prompt: “how do I schedule a Query to run every weekday at 6am?”
Querying data
generate_sql
Converts a natural language question into a SQL query based on your table schemas. The generated query is scoped to the tables accessible by the token. You can then execute it using the execute_sql tool.
Example prompt: “write me a query that returns active users in the last 30 days”
get_relevant_tables_ddl
Discovers which tables are relevant to a given question using semantic search. Returns the full schema (CREATE TABLE DDL) for each matched table — useful for understanding available columns and types before generating SQL.
Example prompt: “which tables should I use to analyze customer churn?”
execute_sql
Executes a SQL query against your data warehouse and returns the results as structured data. Supports pagination for large result sets (up to 1,000 rows per page). The SQL dialect adapts automatically to your cloud — BigQuery for GCP and Nekt Express, Athena for AWS.
Example prompt: “run this query and show me the results: SELECT COUNT(*) FROM orders WHERE status = ‘paid‘“
get_table_preview
Returns a small sample (10 rows) from a table to help understand its contents. Useful for inspecting column values, data formats, and categorical fields before writing queries.
Example prompt: “show me a sample of the orders table”
list_tables
Lists tables in the Catalog one page at a time (100 tables per page). Use this when you need a deterministic, complete enumeration of available tables — for example, when browsing the Catalog without a specific question, or when you need a table’s id. For question-driven discovery, prefer get_relevant_tables_ddl.
Example prompt: “list all tables in the trusted layer”
Browsing files in volumes
list_layers
Lists all data layers (lakehouses) that your token has access to. Returns each layer’s ID, name, slug, and description — use this as the starting point when exploring files stored in Nekt volumes.
Example prompt: “what layers do I have access to?”
list_volumes
Lists volumes (file stores) within a layer, or across all layers if no layer is specified. Returns each volume’s name, slug, and description. Use this after list_layers to discover available file containers.
Example prompt: “what volumes are available in the raw layer?”
list_files
Lists all files stored inside a specific volume. Requires the layer slug and volume slug to scope the results. Returns file metadata including name, type, and size — use this to find the file ID needed to read a file’s content.
Example prompt: “list the files in the contracts volume”
read_file
Downloads and returns the content of a file stored in a Nekt volume. Requires the layer slug, volume slug, and file ID. Returns text files as UTF-8 strings and binary files as base64-encoded content. Files larger than 2 MB cannot be returned inline.
Example prompt: “open the latest invoice in the documents volume and summarize it”
Creating pipelines
create_query
Deploys a SQL Query as a pipeline in Nekt. Accepts the SQL code, a description, the output layer and table name, and an optional trigger — either a cron schedule or an event trigger that runs the Query when one or more upstream pipelines finish. The pipeline starts in preparing status — poll get_pipeline_status until it leaves preparing, then trigger execution with run_pipeline once the user confirms.
Example prompt: “create a daily Query that aggregates revenue by customer into the trusted layer”
create_notebook
Deploys a Python or PySpark Notebook as a pipeline in Nekt. Accepts the notebook code, a description, the runtime type (python-base, pyspark, or python-browser), optional pip dependencies, and an optional trigger — either a cron schedule or an event trigger that runs the Notebook when one or more upstream pipelines finish. For PySpark notebooks, Spark driver and executor sizing can also be configured. Inputs and outputs are extracted automatically from nekt.load_table and nekt.save_table calls in the code, so the notebook must use the Nekt SDK for all table I/O. Like create_query, the pipeline starts in preparing status and follows the same deploy-then-run lifecycle.
Example prompt: “create a PySpark Notebook that joins orders and customers and runs every hour”
Replaces the trigger of an existing Query or Notebook. Supports three trigger types: manual (runs only on demand), cron (runs on a schedule, with a cron expression and timezone), and event (runs whenever upstream pipelines finish). For event triggers, provide the triggering pipeline slugs and an optional rule — any runs the transformation when any of them completes, all waits for all of them. Use list_pipeline_options to discover the available slugs.
Example prompt: “run the daily_revenue Query whenever the orders and customers sources finish”
list_pipeline_options
Lists all Sources, Queries, Notebooks, and Destinations available as pipeline options, returning each one’s slug, description, and type. Use it to discover the slugs needed to configure an event trigger with update_transformation_trigger, or to get an overview of the pipelines in your organization.
Example prompt: “which pipelines can I use to trigger a transformation?”
Running and monitoring pipelines
run_pipeline
Triggers execution of a deployed Query or Notebook pipeline by slug. Returns immediately without waiting for the run to finish — use get_pipeline_status to track progress.
Example prompt: “run the daily_revenue pipeline”
get_pipeline_status
Returns the current status of any pipeline by slug — Queries and Notebooks created through the MCP Server, or Sources and Destinations configured elsewhere in Nekt. Used to track deployment progress after create_query or create_notebook (until status leaves preparing), and to monitor execution after run_pipeline until it reaches a terminal state (success or failed).
Example prompt: “what’s the status of the daily_revenue pipeline?”
list_pipeline_runs
Lists recent runs of any pipeline by slug — Sources, Queries, Notebooks, or Destinations. Returns a summary for each run including its id, status, start and end times, and trigger_type. Supports pagination (up to 100 runs per page). Use this to inspect a pipeline’s execution history, such as checking for recent failures or confirming that a trigger fired.
Example prompt: “show me the last runs of the daily_revenue pipeline”
get_pipeline_run_logs
Fetches the logs of a specific run, or of the most recent run when only a pipeline slug is given. Returns the ERROR-level entries and, when available, Nekt’s AI analysis of the failure — a summary of what happened, the technical details, and a suggested fix. Use this to diagnose a failed run without reading the full log.
Example prompt: “why did the last run of the daily_revenue pipeline fail?”
Adding context
update_resource_description
Updates the Description of a resource in your Catalog. Supported resource_type values are layer, table, field, folder, volume_file, and derived_field. Returns a preview by default — pass confirm=True to apply the change.
When resource_type is derived_field, the tool first identifies the Query or Notebook that produced the target table (via list_queries or list_notebooks), then enriches the field Description with structured tags inferred from the transformation code: @pk, @fk <table>.<column>, @measure additive|non-additive, @attribute, and @grain=<period>. Use this when annotating fact, aggregated, or dimension tables so downstream consumers and AI agents can interpret each column’s role.
Example prompt: “i want to add descriptions to this table: sessions_reviews_consolidated”