pipelines_create
Set up new deployment workflows by creating Heroku pipelines, organizing apps across development stages, and configuring team-based structures with optional initial app settings.
Instructions
Create new Heroku deployment pipelines. Use this tool when you need to: 1) Set up new deployment workflows, 2) Create staged application environments, 3) Organize apps by development stages, 4) Configure team-based pipeline structures. The tool manages pipeline creation with optional team and initial app configuration.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | No | Name of the app to add to the pipeline | |
| name | Yes | Name of the pipeline to create | |
| stage | Yes | Stage of first app in pipeline (e.g., production, staging, development) | |
| team | No | Team to create the pipeline in |
Implementation Reference
- src/tools/pipelines.ts:71-83 (handler)The asynchronous handler function for the 'pipelines_create' tool. It constructs a Heroku CLI command using CommandBuilder with the PIPELINES_CREATE mapping, adds flags and positional arguments from options, executes it via herokuRepl, and processes the output with handleCliOutput.async (options: PipelinesCreateOptions): Promise<McpToolResponse> => { const command = new CommandBuilder(TOOL_COMMAND_MAP.PIPELINES_CREATE) .addFlags({ stage: options.stage, app: options.app, team: options.team }) .addPositionalArguments({ name: options.name }) .build(); const output = await herokuRepl.executeCommand(command); return handleCliOutput(output); }
- src/tools/pipelines.ts:13-18 (schema)Zod schema defining the input parameters for the pipelines_create tool: name (required string), stage (enum: development/staging/production), optional app and team.export const pipelinesCreateOptionsSchema = z.object({ name: z.string().describe('Pipeline name'), stage: z.enum(['development', 'staging', 'production']).describe('Initial pipeline stage'), app: z.string().optional().describe('App to add to pipeline'), team: z.string().optional().describe('Team owning the pipeline') });
- src/tools/pipelines.ts:66-85 (registration)The registration function that registers the 'pipelines_create' tool on the MCP server using server.tool(), providing name, description, input schema shape, and handler function.export const registerPipelinesCreateTool = (server: McpServer, herokuRepl: HerokuREPL): void => { server.tool( 'pipelines_create', 'Creates new Heroku deployment pipeline with configurable stages, apps, and team settings', pipelinesCreateOptionsSchema.shape, async (options: PipelinesCreateOptions): Promise<McpToolResponse> => { const command = new CommandBuilder(TOOL_COMMAND_MAP.PIPELINES_CREATE) .addFlags({ stage: options.stage, app: options.app, team: options.team }) .addPositionalArguments({ name: options.name }) .build(); const output = await herokuRepl.executeCommand(command); return handleCliOutput(output); } ); };
- src/index.ts:93-93 (registration)The call to registerPipelinesCreateTool during MCP server initialization in the main index file.pipelines.registerPipelinesCreateTool(server, herokuRepl);
- src/utils/tool-commands.ts:49-49 (helper)TOOL_COMMAND_MAP entry mapping PIPELINES_CREATE to the Heroku CLI command 'pipelines:create', used by CommandBuilder in the handler.PIPELINES_CREATE: 'pipelines:create',