Plan Pipeline
plan_pipelinePlan a Coalesce pipeline by discovering and ranking node types from the repo. Provide a goal and source node IDs to get the best node type and scaffold the pipeline.
Instructions
Plan a Coalesce pipeline by discovering and ranking all available node types from the repo. ALWAYS call this before creating nodes to get the correct node type.
The planner scans the repo for all committed node type definitions, scores them against your use case, and returns ranked candidates. When available, it also returns a cached planSummaryUri MCP resource for the ranked node type summary so you can reuse that guidance throughout the pipeline without calling the planner again.
IMPORTANT — DO NOT WRITE SQL: The sql parameter is ONLY for converting SQL that the USER provided (pasted or typed). If you are building a pipeline yourself, provide goal + sourceNodeIDs instead.
PREREQUISITE: Before calling this tool, use list_workspace_nodes to discover available source/upstream nodes and their IDs in the workspace.
Preferred approach: Provide goal AND sourceNodeIDs. The planner selects the best node type and scaffolds the pipeline. Without sourceNodeIDs, the planner returns clarification questions.
User-provided SQL: When a user pastes SQL, pass it in sql. The planner parses refs and column projections.
Consult coalesce://context/node-type-corpus for node type patterns and metadata structures.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | No | The user's EXACT SQL, copied verbatim. It may use raw table names or existing Coalesce {{ ref() }} syntax. Do NOT rewrite between SQL styles or modify the query. If you are building a pipeline yourself, do NOT write SQL — use goal + sourceNodeIDs instead. | |
| goal | No | Optional natural-language pipeline goal | |
| schema | No | Optional target schema | |
| database | No | Optional target database | |
| repoPath | No | Optional local committed Coalesce repo path for repo-first node-type ranking. Falls back to COALESCE_REPO_PATH or `repoPath` in the active ~/.coa/config profile when omitted. | |
| targetName | No | Optional target node name override | |
| description | No | Optional node description | |
| workspaceID | Yes | The workspace ID | |
| locationName | No | Optional target locationName | |
| sourceNodeIDs | No | Optional upstream node IDs when planning from a non-SQL goal. | |
| targetNodeType | No | Optional node type override. When omitted, the planner ranks repo-backed and observed workspace node types for the use case. | |
| configOverrides | No | Optional config overrides to merge into the planned node body. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | No | ||
| goal | No | ||
| nodes | No | ||
| intent | No | ||
| status | No | ||
| version | No | ||
| warning | No | ||
| platform | No | ||
| warnings | No | ||
| planCached | No | ||
| assumptions | No | ||
| instruction | No | ||
| workspaceID | No | ||
| openQuestions | No | ||
| cteNodeSummary | No | ||
| planSummaryUri | No | ||
| STOP_AND_CONFIRM | No | ||
| nodeTypeSelection | No | ||
| USE_THIS_NODE_TYPE | No | ||
| supportedNodeTypes | No | ||
| nodeTypeDisplayName | No | ||
| nodeTypeInstruction | No |