When to use these tools
- You want an AI agent to build a new source-to-destination package in a single tool call from a natural-language prompt.
- You want the agent to clone an existing pipeline as a template, then swap in different connections, tables, or paths.
- You want the agent to add, edit, or remove components on an existing pipeline without opening the package designer.
- You want the agent to rename a package or define its public variables in place.
- You want the agent to fix a broken edge or component without opening the package designer.
- You want the agent to detect the columns of a CSV or other delimited file on an SFTP, S3, or GCS connection before wiring it into a flow.
- You want the agent to archive packages that failed an authoring attempt so they don’t clutter the active list.
Tool reference
build_pipeline (mutation)
Builds a complete source → destination pipeline in one call from a high-level intent. The server discovers the source schema, picks the matching component types for each connection, wiressource → select → destination with edges, maps fields 1:1, and persists the package. The agent only passes intent (which connections, which table or file path, which fields, any computed columns), so the build turn stays fast even on wide schemas.
Prefer build_pipeline over create_package for a straightforward “load X into Y” build. Use create_package or add_package_components when the shape isn’t covered here: filters, joins, multiple sources, a file or cloud-storage destination, or edits to an existing package.
Destination intent. Must be a database or warehouse connection (for example Snowflake, Redshift, BigQuery, MySQL, Postgres). File and cloud-storage destinations are not yet supported here, use
create_package for those."all" (default) carries every discovered source column. An array of source column names keeps only that subset.Derived columns to append. Each entry:
{ "name": "<output column>", "expression": "<Pig expression>" }. A computed name equal to a source column overrides that column.source accepts:
connection_id(integer, required).path(string) for file or cloud-storage sources (SFTP, S3, GCS, SharePoint).table_name(string) for database or warehouse sources.schema_name(string), optional, database sources only.object_name(string) for a Salesforce object source, for exampleContactorOpportunity. The server fetches the object’s fields itself, the same way the package designer does. Supported onsalesforceandsalesforceownoauthconnections.salesforcesoapconnections are not supported for object sources.api_version(string), optional, Salesforce object sources only.BulkV1orBulkV2. Omit to use the default,BulkV1.delimiter(string), file field delimiter, default,.header_row(boolean), whether the file has a header row, defaulttrue.source_path_field_alias(string), optional, file and cloud-storage sources only. When set, adds an output column with this exact name carrying the source file path each row was read from. Use this when the agent wants the filepath as a column for lineage. Never hardcode the literal path as a field value.source_modified_field_alias(string), optional, file and cloud-storage sources only. When set, adds adatetimeoutput column with this exact name carrying the last-modified time (UTC) of the source file each row was read from. Not available for Excel, Parquet, XML, X12 or whole-file raw sources,.zippaths, Google Drive, or copy-first source actions.
destination accepts:
connection_id(integer, required).table_name(string, required).schema_name(string), optional.database(string), optional, Snowflake destinations only. Writes into this database instead of the connection’s default database. Requiresschema_name. Any other destination type returns an error.operation_type(string), write mode (for exampleappend,truncate_and_insert,merge). Defaults toappend. Validated against the destination’s allowedwrite_modesfromdescribe_component_type.create_table(boolean), auto-create the table, defaulttrue.merge_keys(array of string), required for merge and upsert modes (merge,merge_update_and_insert,insert_or_update). Each name flags the matching destination column withis_merge_key: true. The platform never infers the key, so a merge withoutmerge_keyswill not upsert correctly. Append, overwrite, and truncate modes ignore this field.
build_pipeline once per object.
In Helm, build_pipeline builds into the package open in the designer instead of creating a new package. The first build uses the component names Source, Select, and Destination. If those names are already taken, the new components are named after the object, table, or file being built, for example Source_Opportunity, and the new chain is placed beside the existing one on the canvas.
The tool returns the new package_id and also runs validate_package automatically so the caller knows whether the build is clean on the first response.
Example: SFTP to Snowflake with a merge key and filepath column
Example: Salesforce object to Snowflake
Languages__c get a Pig-safe alias (Languages_c) in the pipeline. The destination column keeps the original name.
Error envelopes
create_package (mutation)
Mints a new package from a fulldata_flow_json spec. Components and edges are persisted in a single transaction, partial packages are never written.
variables is not accepted. Packages that need package-level variables must be created through the REST API.
Components must match the flow type
create_package and add_package_components reject components that don’t belong in the package’s flow_type. The check also runs on dry runs, and nothing is written when it fails.
- A
workflowpackage accepts only workflow tasks, such asrun_package_component,run_workflow_component,execute_sql_component, andfile_mover_component. Sticky notes are also allowed. - A
dataflowpackage accepts sources, transformations, and destinations, but no workflow tasks.
dataflow package. Then reference it from the workflow with a run_package_component. clone_package and revert_package apply the same check to the stored package body they would write. See Package type mismatches.
Component shape
Each component is a single-key wrapper hash. The key is the wrapper type (for exampledatabase_source_component), and the inner hash carries the configuration. Common fields:
id, stable identifier referenced by edges. Convention iscomponent-<hex>. Omit to let the server generate one.name, human-readable label shown on the canvas.xy,[x, y]position pair. Optional. The server lays out a new package from its graph shape and overwrites this value. See Canvas layout.alias, data-flow alias. Sources expose this; destinations consume it viainput_alias.connection, connection metadata block. Uses the generic keyconnection, not type-specific keys. Shape:{ "id": <integer>, "name": "<display name>", "type": "<connection-type-slug>" }. Withoutnameandtype, the dashboard can’t render the connection chip. Whenupdate_package_componentschanges a*_connection_id, the server clears this block and re-embeds it from the new connection so the dashboard chip stays in sync with the connection the job will run.<type>_connection_id, string form of the connection id (for example"cloud_storage_connection_id": "47376").specificComponentType, vendor sub-type (for examplesftp_source_component,mysql_source_component). Required when the wrapper covers multiple vendors so the dashboard renders the correct icon and form.schema, nested object{ "fields": [{ name, alias, data_type }, ...] }. Each field needs analias.
Canvas layout
The server positions components on the canvas for you. It uses the same layout engine as the Auto align button in the package designer, so an MCP-built pipeline has the same shape as one you align in the dashboard. Sources in a join or union no longer stack on top of each other.build_pipelineandcreate_packagealways lay out the whole graph. The server overwrites anyxyyou send.add_package_components,remove_package_components, andupdate_package_edgesre-lay out the whole graph only while every component is still where the server’s layout put it.- If you or another user has moved a component on the canvas, those tools keep that arrangement.
add_package_componentsthen places each new component just below its parent instead. update_package_componentsnever changes layout. It ignoresxyfor pipeline components.- Sticky notes are not part of the layout. They keep their positions, and you can move them with
update_package_components.
xy values you sent. Keep sending xy for that reason, but you never need to correct a component’s position by hand.
Edge shape
Edges reference components by theirid field:
id and label are optional, the server generates them when absent.
Best practice: clone from an existing package
The safest way to compose a validdata_flow_json is to read a similar existing package first:
- Call
list_packagesand find a pipeline with the same source and destination connection types. - Call
get_package(<that_id>, include_full_graph: true)and inspect itsdata_flow_json. - Use the result as a template. Swap in your own connection ids and table or file paths. Keep the structural keys.
api_key query params, Authorization headers, basic-auth passwords, and similar) come back as [REDACTED] in the full graph. Structure and non-secret fields are preserved, so the result is still a valid template, refer real credentials through a connection or a secret variable when you re-author the package. See Inline secret redaction in get_package.
describe_component_type output is sufficient to build a component on its own. Every component returns an example (real fixture or generated skeleton), property_values publishes the allowed values for enum-constrained properties, and example_omitted names the required properties the example could not render. Reading a similar package with get_package is an optional cross-check, useful mainly for the nested shapes named in example_omitted.
Returns
On success:{ package_id, package_version, name, flow_type, flow_version, workspace_id, created_at, warnings }. The warnings array lists shape fixups the server applied (for example rewriting a vendor-named wrapper to the canonical wrapper plus specificComponentType).
On failure: { error: "..." }, workspace not in account, name too long, save failure, and so on.
clone_package (mutation)
Mutation. Copies an existing package into a NEW package to use as a template, without editing the original. The clone copies the source’sdata_flow_json, variables, description, and flow type, is attributed to the calling user, and gets a new package_id. For workflow packages, sub-package references inside data_flow_json are preserved as-is, not recursively deep-cloned.
Workspace to place the clone in. Must belong to the calling account. Defaults to the source package’s workspace.
Description for the new package, up to 1024 characters. Defaults to the source package’s description.
{ new_package_id, source_package_id, name, flow_type, workspace_id, owner_id, created_at } on success.
add_package_components (mutation)
Appends one or more NEW components (and, optionally, new edges) to an existing package’s flow. This is the “extend a package the user already has open” operation, for example “add a Select component” or “insert a Filter between the source and destination.” It fills the gap betweencreate_package (builds a whole package) and update_package_components (only edits components that already exist).
One or more single-key wrapper hashes, the same shape
create_package uses. See Component shape.New edges wiring the added components in. Omit to add components unwired, then call
update_package_edges.create_package. Two placement details are specific to adding:
namemust be unique within the package, it is howupdate_package_componentslater targets the component.xyis optional. When the package is empty, or still in the server’s own layout, the server re-lays out the whole graph and overwrites anyxyyou send. When someone has arranged the canvas by hand, the server places each new component wired to an existing one just below its parent. It also nudges the downstream chain down to make room. In that case, provide an explicitxyonly for a standalone component with no incoming edge (for example a new source). See Canvas layout.
discover_schema, discover_file_schema, or preview_data returned them, same spelling and case. Never add an f_ prefix or rename a field; the platform makes Pig aliases valid and reserved-word-safe automatically.
The call is all-or-nothing and row-locked: if any new component’s name or id collides with one already in the flow, nothing is written. Each successful call bumps the package version via PaperTrail and is reversible from the version history UI.
Returns { package_id, components_added, edges_added, new_version, updated_at } on success, plus a warnings array listing any wrapper-shape fixups the server applied.
update_package_components (mutation)
Mutation. Edits specific components that ALREADY EXIST in a package’sdata_flow_json. Each entry is { component_name, updates }, where component_name matches the inner name field on a component and updates is a hash of fields to merge onto it. Untouched top-level fields are preserved, and nested hashes are merged recursively (deep merge), so a partial config update does not drop sibling keys. To ADD a new component use add_package_components, to REMOVE one use remove_package_components, and to re-wire edges use update_package_edges.
At least one entry. Each entry is
{ component_name, updates }: component_name matches a component’s inner name, and updates is a hash of fields to deep-merge onto that component. The name and id fields are protected and cannot be overwritten, since edges reference them. Do not place credentials in updates; connection secrets live in connection management, and putting them in data_flow_json leaks them through the version history.component_name is not found in the flow, the entire update is rejected and nothing is persisted. When an updates hash changes a *_connection_id, the server clears the stale connection display block and re-embeds it from the new connection so the dashboard chip stays in sync. The package row is locked (SELECT FOR UPDATE) for the save so concurrent agent calls serialize correctly. Each successful call bumps the package version via PaperTrail and is reversible from the version history UI.
Do not send xy in updates. The server owns canvas positions for pipeline components, so it drops xy from the update and still applies the rest. Sticky notes are the exception and take the xy you send. See Canvas layout.
Returns { package_id, components_updated, draft, draft_updated_at } on success. When the server dropped xy from any entry, the response also includes layout_ignored, a list of the affected component names:
list_component_types (read)
Enumerates every component registered in the platform catalog. Returns one entry per concrete subclass with:name, internal name (for examplemysql_source_component). Pass this todescribe_component_type.category, one ofsource,transformation,destination, orworkflow. Workflow tasks (for examplerun_package_component) categorize asworkflow, nottransformation.class_name, Ruby class name, informational.description, header docstring from the component’s source file.wrapper_key, the outer key to use indata_flow_json. May benullfor transformations or unmapped classes.specific_component_type, value for the innerspecificComponentTypefield. May benullwhen the vendor has its own top-level wrapper.
category argument filters the result. Accepts source, transformation, destination, or workflow.
describe_component_type output is sufficient to build a component. Reading a similar package with get_package is an optional cross-check, not a prerequisite.
describe_component_type (read)
Per-component introspection by internal name. Returns:properties, writable attribute names extracted fromattr_accessordeclarations.required, attribute names with unconditional presence validators.conditionally_required, attributes required only when a gating flag or mode is set (for exampleerrors_output_pathonly whentrack_errorsis true). Do not set these unless the gating condition applies.category,source,transformation,destination, orworkflow.description, header docstring.property_values, allowed values for properties this component constrains to a fixed set (for examplemethod,response_type,file_format,pagination_scheme). If a property is listed here you must use one of its values.operation_typeis never here; it appears underwrite_modeswhen the destination has curated modes.property_value_conditions, the subset ofproperty_valuesthat only takes effect when another property is set a certain way. Keyed as{"<property>": {"property": "<gate>", "must_be": true|false}}. For example,pagination_schemerequiresuse_pagination: true. Sending a scheme on its own validates green and then fetches only the first page.write_modes, theoperation_typevalues a destination supports, with labels forpresent_options.nullfor non-destinations and destinations without selectable modes. Whennull, do not guess anoperation_type. Cloud-storage destinations derive it fromdestination_exists_action+delete_destination_path.example, a ready component shape. Always present.example_source,"fixture"when the example comes from a real component,"generated"when it is a minimal shape built fromrequired+property_values. In a generated example, values written<like this>are placeholders to fill in. Enum properties render as a choice (for example<GET|POST|PATCH|PUT>), never a defaulted first value.example_omitted, required properties the example leaves out. Two kinds: plain scalars only the caller knows (table_name,object_name,path,url, and so on), and nested objects (schema,predicates,relations,aggregated_fields,destination_type) whose inner shape the example cannot render. For a nested one, look up its shape in the Component shape section oncreate_packageand in this component’sdescription.wrapper_key,specific_component_type,valid_specific_types,wrapper_example, copy-paste-ready wrapper recipe.
type (the name from list_component_types). Returns { error: "unknown component type: <type>" } for unknown names.
A property in neither required nor conditionally_required, and not called out in description, is optional.
Connections are the exception: a connection property absent from those lists does not mean the component works without one. Some components declare no validator and simply fail later. Treat a connection as needed unless properties also offers an inline-auth alternative (headers, or username + password). Only then may you ask which auth method to use (none, a token or key in headers, Basic, or an existing connection).
update_package_edges (mutation)
Replaces a package’s edges array wholesale. Pass the complete desired edges array, existing edges are overwritten.Full edges array. Each edge needs at minimum
source and target matching a component id in the current package.source and target against the package’s current components. If any edge references an unknown component, the entire call is rejected, no partial writes. Each write bumps the package version via PaperTrail and is reversible through the existing UI history. If the canvas is still in the server’s own layout, the server re-lays out the whole graph for the new wiring. See Canvas layout.
Use this when validate_package surfaces an edge-related error after create_package and you need to fix wiring in place. For component-internal edits (changing a connection, adjusting a schema), use update_package_components.
remove_package_components (mutation)
Removes one or more components from an existing package’s flow by componentname. Any edge whose source or target was a removed component is dropped at the same time, so the package never ends up with dangling edges.
Inner
name values from the package’s components. The same key update_package_components targets.add_package_components. To edit one in place, use update_package_components. To archive the entire package, use delete_package.
Returns { package_id, components_removed, edges_removed, new_version, updated_at } on success.
rename_package (mutation)
Renames a package and, optionally, updates its description. Metadata-only.data_flow_json (components and edges) is left untouched.
The change is attributed to the calling user and recorded in the package version history, the same as a rename through the dashboard. Use this when an agent needs to retitle a package after a prompt-driven authoring step rather than asking the user to open the UI.
Returns { package_id, previous_name, name, updated_at } on success.
manage_package_variables (mutation)
Defines, updates, or removes a package’s public variables. Public variables are the named defaults a package exposes; per-run overrides are still passed throughrun_package’s variables argument.
Hash of
{ variable_name => default_value } to add or update. Names must contain only letters, digits, and underscores, and must start with a letter or underscore (for example start_date). Values are stored as given; for Pig string literals, follow the embedded single-quote rule used by run_package. At least one of set or remove is required.Variable names to delete. Names are not checked here, so you can remove a variable saved with a name that doesn’t follow the naming rule. At least one of
set or remove is required.set would store it as a plaintext public variable.
Returns { package_id, variables } (the full resulting public-variable map) on success.
File-schema detection is covered by discover_file_schema on the Reading & Inspecting page.
delete_package (mutation)
Archives a package, same semantics as the dashboard’s Archive action. TheJob row is preserved with status archived, removed from the active package list, and remains queryable via list_packages(status: 'archived').
If any schedule includes the package, enabled or disabled, the archive is rejected and the error lists the schedule ids. Disabling the schedule is not enough. No MCP tool removes a package from a schedule or deletes a schedule, so remove the package from the schedule, or delete the schedule, in the dashboard first.
Use this to clean up after an unsalvageable create_package attempt so failed iterations don’t accumulate as dead rows.
Returns { package_id, status: 'archived', archived_at } on success, or { error: "..." } for package-not-found or rejected transitions.
Version history
Every write through the package-authoring tools is versioned via PaperTrail. These tools let an agent inspect that history, save its draft as a new version, throw a draft away, and roll back a change.list_package_versions (read)
Read-only. Lists a package’s saved version history (PaperTrail snapshots), oldest first, with the current state last. Summary only, not the fulldata_flow_json of each version. Up to 100 entries.
Each entry:
version (the index to pass to revert_package), package_version, description, author, created_at, component_count, and current. To undo the most recent change, use the highest-numbered current: false entry (the one immediately before the current entry).revert_package (mutation)
Mutation. Forward-only rollback to a prior version returned bylist_package_versions. It restores the chosen version’s data_flow_json as a NEW version, so the revert is itself undoable, and leaves the package’s schedules and run history untouched.
Like a rollback in the dashboard, a revert also discards your unsaved draft of the package, because the draft was based on the version being replaced. If get_package reports has_unsaved_draft, tell the user those edits will be lost before reverting.
The index of a
list_package_versions entry whose current is false. That list is oldest-first with the current state last, so to undo the most recent change pick the highest-numbered current: false entry (the one immediately before the current entry). Never pass the current entry.Report what would be reverted without writing. The report includes
would_discard_draft, which is true when you have a draft that the revert would discard.{ package_id, draft_discarded, reverted_to_version, restored_from_package_version, new_package_version, updated_at } on success. draft_discarded is true when your draft was discarded.
save_package_version (mutation)
Mutation. Saves your draft of a package as a new version, the same as Save Version in the dashboard. Edits made with the component, edge, and variable tools land in your draft only, whilerun_package and schedules run the saved version, so call this before running an edited package. It changes what the package runs: describe what will be saved and confirm with the user first. It requires permission to update the package.
Before saving, it validates the draft and refuses to save if validation fails, returning the errors by component to fix. It also refuses when someone else saved a newer version after your draft was started, unless you pass overwrite_newer_version: true. Pass that only after the user confirms replacing that version. A draft with a blank package variable name, components that do not fit the package’s flow type, or an invalid connection binding is refused too.
Save even though a teammate saved a newer version after your draft was started. That newer version is replaced as the current one.
Report what would be saved, under
would_save with the version it would move from and to, without saving. Validation runs only when the save is committed, so a dry run does not validate the draft, but it still reports a missing draft (no_draft) or a newer version (version_behind).{ package_id, saved: true, previous_package_version, new_package_version, version_description, draft_cleared: true, validation, undo } on success, where undo is the revert_package call that restores the previous version (it is absent when there is nothing to revert to).
When nothing is saved, it returns saved: false with an error. A refused save also carries a reason:
A draft that fails validation returns the
validation details instead of a reason.
discard_draft (mutation)
Mutation. Discards your unsaved draft of a package, the same as Discard Draft in the dashboard. The package goes back to its saved version. The saved version, its history, and other users’ drafts are not touched, because drafts belong to one user. Use it to start over when draft edits went wrong, instead of undoing them one by one. Unsaved edits are not versioned, so a discarded draft cannot be recovered. Tell the user what will be lost and confirm first. It requires permission to update the package.Report what would be discarded, under
would_discard with draft_base_version, draft_updated_at, draft_component_count, and saved_package_version, without discarding it. If you have no draft, it reports the no_draft result instead.{ package_id, discarded: true, draft_base_version, draft_updated_at, draft_component_count, saved_package_version } on success. If you have no draft, it returns { package_id, discarded: false, reason: "no_draft", message } and changes nothing.
Recommended agent flow
Example: create a minimal SFTP-to-S3 package
package_id. Pass it to validate_package next, fix any errors with update_package_components or update_package_edges, then run with run_package.
Error envelopes
Mutating tools return a plain{ "error": "..." } object instead of a JSON-RPC error when the failure is expected and recoverable. Common cases:
Unrecoverable failures (auth, malformed JSON-RPC) return standard JSON-RPC error responses, see the MCP Server overview for HTTP-level errors.
Audit trail
Every write performed through these tools is captured in your account’s audit history via PaperTrail. Package creates, edge updates, and archive transitions all record the calling user as the author. Component edits made byupdate_package_components are versioned and reversible through the existing package version history UI.