Skip to main content
Glama
heroku

Heroku MCP server

Official
by heroku

ps_scale

Adjust Heroku application dyno quantities, resize dynos for performance, view current formation, and manage resource allocation using type-specific scaling.

Instructions

Scale and resize Heroku application dynos. Use this tool when you need to: 1) Adjust dyno quantities up or down, 2) Change dyno sizes for performance, 3) View current formation details, 4) Manage resource allocation. The tool handles dyno scaling with support for type-specific adjustments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appYesName of the app to scale
dynoNoThe type and quantity of dynos to scale (e.g., web=3:Standard-2X, worker+1). Omit to display current formation.

Implementation Reference

  • The main handler function for the 'ps_scale' tool. It builds a 'ps:scale' command using the provided app name and optional dyno scaling argument, executes it via the Heroku REPL, and returns the processed CLI output.
    async (options: PsScaleOptions): Promise<McpToolResponse> => { const command = new CommandBuilder(TOOL_COMMAND_MAP.PS_SCALE) .addFlags({ app: options.app }) .addPositionalArguments(options.dyno ? { dyno: options.dyno } : {}) .build(); const output = await herokuRepl.executeCommand(command); return handleCliOutput(output); }
  • Zod schema defining the input parameters for the 'ps_scale' tool: required 'app' name and optional 'dyno' specification. Includes inferred TypeScript type.
    export const psScaleOptionsSchema = z.object({ app: z.string().describe('App name to scale'), dyno: z .string() .optional() .describe('Dyno type and quantity (e.g., web=3:Standard-2X, worker+1). Omit to show current formation') }); export type PsScaleOptions = z.infer<typeof psScaleOptionsSchema>;
  • src/tools/ps.ts:78-95 (registration)
    The registration function for the 'ps_scale' tool, which calls server.tool() with the tool name, description, input schema, and handler function.
    export const registerPsScaleTool = (server: McpServer, herokuRepl: HerokuREPL): void => { server.tool( 'ps_scale', 'Scale Heroku app dynos. Adjust quantities, change sizes, view formation details, manage resources.', psScaleOptionsSchema.shape, async (options: PsScaleOptions): Promise<McpToolResponse> => { const command = new CommandBuilder(TOOL_COMMAND_MAP.PS_SCALE) .addFlags({ app: options.app }) .addPositionalArguments(options.dyno ? { dyno: options.dyno } : {}) .build(); const output = await herokuRepl.executeCommand(command); return handleCliOutput(output); } ); };
  • src/index.ts:89-89 (registration)
    Top-level invocation of the registerPsScaleTool during MCP server initialization.
    ps.registerPsScaleTool(server, herokuRepl);
  • TOOL_COMMAND_MAP constant mapping 'PS_SCALE' to the Heroku CLI command 'ps:scale', used by the CommandBuilder in the handler.
    PS_SCALE: 'ps:scale',

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/heroku/heroku-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server