pipelines_promote
Promote applications through pipeline stages to deploy code, manage staged releases, coordinate multi-app promotions, and control deployment workflows. Simplifies safe app promotion between environments.
Instructions
Promote applications through pipeline stages. Use this tool when you need to: 1) Deploy code to staging or production environments, 2) Manage staged releases, 3) Coordinate multi-app promotions, 4) Control deployment workflows. The tool handles safe promotion of apps between pipeline stages.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | Yes | Name of the app to promote from | |
| to | No | comma separated list of apps to promote to |
Implementation Reference
- src/tools/pipelines.ts:98-108 (handler)The main handler function for the 'pipelines_promote' tool. It constructs a CommandBuilder for 'pipelines:promote', adds app and to flags from options, executes via herokuRepl, and returns handled CLI output.async (options: PipelinesPromoteOptions): Promise<McpToolResponse> => { const command = new CommandBuilder(TOOL_COMMAND_MAP.PIPELINES_PROMOTE) .addFlags({ app: options.app, to: options.to }) .build(); const output = await herokuRepl.executeCommand(command); return handleCliOutput(output); }
- src/tools/pipelines.ts:25-28 (schema)Zod schema defining input parameters for the pipelines_promote tool: app (required string), to (optional string). Used for validation in tool registration.export const pipelinesPromoteOptionsSchema = z.object({ app: z.string().describe('Source app for promotion'), to: z.string().optional().describe('Target apps for promotion (comma-separated)') });
- src/tools/pipelines.ts:93-110 (registration)Registration function that calls server.tool() to register 'pipelines_promote' with name, description, input schema, and handler function on the MCP server.export const registerPipelinesPromoteTool = (server: McpServer, herokuRepl: HerokuREPL): void => { server.tool( 'pipelines_promote', 'Promotes apps between pipeline stages with configurable target applications', pipelinesPromoteOptionsSchema.shape, async (options: PipelinesPromoteOptions): Promise<McpToolResponse> => { const command = new CommandBuilder(TOOL_COMMAND_MAP.PIPELINES_PROMOTE) .addFlags({ app: options.app, to: options.to }) .build(); const output = await herokuRepl.executeCommand(command); return handleCliOutput(output); } ); };
- src/index.ts:94-94 (registration)The call to registerPipelinesPromoteTool during MCP server initialization, passing server and herokuRepl instances.pipelines.registerPipelinesPromoteTool(server, herokuRepl);
- src/utils/tool-commands.ts:50-50 (helper)Constant in TOOL_COMMAND_MAP that maps to the Heroku CLI command 'pipelines:promote' used by the handler.PIPELINES_PROMOTE: 'pipelines:promote',