ps_list
List and monitor Heroku app dynos to view running processes, check status, monitor health, and verify configurations. Supports JSON output for detailed process visibility.
Instructions
List and monitor Heroku application dynos. Use this tool when you need to: 1) View all running dynos for an app, 2) Check dyno status and health, 3) Monitor application process states, 4) Verify dyno configurations. The tool provides process visibility with optional JSON output format.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | Yes | Name of the app to list processes for | |
| json | No | Return process information in json format |
Implementation Reference
- src/tools/ps.ts:58-68 (handler)The async handler function for the ps_list tool. It builds the 'ps' CLI command with app and optional json flags using CommandBuilder, executes it via the HerokuREPL, and processes the output with handleCliOutput.async (options: PsListOptions): Promise<McpToolResponse> => { const command = new CommandBuilder(TOOL_COMMAND_MAP.PS) .addFlags({ app: options.app, json: options.json }) .build(); const output = await herokuRepl.executeCommand(command); return handleCliOutput(output); }
- src/tools/ps.ts:13-16 (schema)Zod input schema for ps_list tool defining 'app' (string, required) and 'json' (boolean, optional). Used for validation and tool call parameters.export const psListOptionsSchema = z.object({ app: z.string().describe('App name to list processes for'), json: z.boolean().optional().describe('Output process info in JSON format') });
- src/tools/ps.ts:53-70 (registration)The exported registerPsListTool function that calls server.tool to register the ps_list tool with its name, description, input schema, and handler function.export const registerPsListTool = (server: McpServer, herokuRepl: HerokuREPL): void => { server.tool( 'ps_list', 'List and monitor Heroku app dynos. View running dynos, check status/health, monitor process states, verify configurations.', psListOptionsSchema.shape, async (options: PsListOptions): Promise<McpToolResponse> => { const command = new CommandBuilder(TOOL_COMMAND_MAP.PS) .addFlags({ app: options.app, json: options.json }) .build(); const output = await herokuRepl.executeCommand(command); return handleCliOutput(output); } ); };
- src/index.ts:88-88 (registration)Top-level call to registerPsListTool during MCP server initialization, passing the server and herokuRepl instances.ps.registerPsListTool(server, herokuRepl);