Pipelines
pipeline_list
pipeline_list
List all pipelines in the project.Arguments: noneExample prompt: “List all my Mage pipelines”
pipeline_get
pipeline_get
Get details for a single pipeline.
| Parameter | Type | Required | Description |
|---|---|---|---|
uuid | string | yes | Pipeline UUID |
pipeline_create
pipeline_create
Create a new pipeline.
Example prompt: “Create a new streaming pipeline called
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | Pipeline name |
type | string | no | python (default), streaming, or integration |
realtime_events”pipeline_update
pipeline_update
Update fields on an existing pipeline.
| Parameter | Type | Required | Description |
|---|---|---|---|
uuid | string | yes | Pipeline UUID |
name | string | no | New name |
description | string | no | Updated description |
pipeline_delete
pipeline_delete
Delete a pipeline by UUID.
| Parameter | Type | Required | Description |
|---|---|---|---|
uuid | string | yes | Pipeline UUID |
Blocks
block_list
block_list
List all blocks in a pipeline.
| Parameter | Type | Required | Description |
|---|---|---|---|
pipeline_uuid | string | yes | Pipeline UUID |
block_get
block_get
Get block details including source code.
| Parameter | Type | Required | Description |
|---|---|---|---|
pipeline_uuid | string | yes | Pipeline UUID |
uuid | string | yes | Block UUID |
block_create
block_create
Create a new block in a pipeline.
Supported block types:
Example prompt: “Add a SQL transformer block to the
| Parameter | Type | Required | Description |
|---|---|---|---|
pipeline_uuid | string | yes | Pipeline UUID |
name | string | yes | Block name |
type | string | yes | Block type (see below) |
language | string | no | python (default), sql, r, yaml, markdown |
content | string | no | Initial source code |
upstream_blocks | array | no | UUIDs of upstream blocks |
config | object | no | Additional block configuration |
data_loader, transformer, data_exporter, sensor, callback, chart, conditional, custom, dbt, extension, global_data_product, markdown, scratchpadIf no
config is provided, mage-agent automatically matches a block template for you. For integration pipelines, it also auto-detects available sources and destinations.customer_etl pipeline that filters rows where revenue > 1000”block_update
block_update
Update a block’s code or configuration.
| Parameter | Type | Required | Description |
|---|---|---|---|
pipeline_uuid | string | yes | Pipeline UUID |
uuid | string | yes | Block UUID |
content | string | no | New source code |
name | string | no | New name |
upstream_blocks | array | no | Updated upstream block UUIDs |
block_templates_list
block_templates_list
List available block templates.
Templates are cached for 24 hours at
| Parameter | Type | Required | Description |
|---|---|---|---|
force_refresh | boolean | no | Bypass the daily cache and re-fetch from cluster |
~/.mage-agent/cache/block_templates.json.Runs & Logs
run_pipeline
run_pipeline
Trigger a pipeline run.
Example prompt: “Run the
| Parameter | Type | Required | Description |
|---|---|---|---|
pipeline_uuid | string | yes | Pipeline UUID |
payload | object | no | Optional run payload (variables, etc.) |
daily_refresh pipeline”run_logs
run_logs
Fetch logs for a specific pipeline run.
Example prompt: “Show me the logs for the last run”
| Parameter | Type | Required | Description |
|---|---|---|---|
pipeline_run_id | string | yes | Pipeline run ID (returned by run_pipeline) |
Sync
sync_project_to_local
sync_project_to_local
Pull all remote project files to a local directory.
| Parameter | Type | Required | Description |
|---|---|---|---|
local_project_dir | string | no | Local directory path (default: .mage-agent/local_sync) |
sync_status
sync_status
Show what has changed between local and remote.
| Parameter | Type | Required | Description |
|---|---|---|---|
local_project_dir | string | no | Local directory path |
sync_local_to_remote
sync_local_to_remote
Push locally changed files to the cluster.
| Parameter | Type | Required | Description |
|---|---|---|---|
local_project_dir | string | no | Local directory path |
Error responses
All tool errors return a structured envelope:| Error code | Cause |
|---|---|
CONFIG_INVALID | Missing or malformed ~/.mage-agent/config.json |
AUTH_REQUIRED | No credentials found |
AUTH_EXPIRED | 401/403 from cluster — run mage-agent login |
API_ERROR | Cluster API returned an error |
TOOL_NOT_FOUND | Requested tool name is not registered |
INTERNAL_ERROR | Unexpected internal failure |