list_addon_plans
View, compare, and check availability of Heroku add-on service plans. Input the service slug to retrieve detailed information including pricing, descriptions, and private space installation capability.
Instructions
List available plans for a specific Heroku add-on service. Use this tool when you need to: 1) View all plans for a service, 2) Compare plan pricing, 3) Check plan availability. Requires add-on service slug and returns detailed plan information.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | No | Controls the response format and detail level. When true, returns a structured JSON response containing additional add-on plan metadata including descriptions, pricing and indicating if the plan is installableinside a private space or not. When false or omitted, returns a human-readable text format. | |
| service | Yes | Identifies the add-on service whose plans you want to list. Requirements and behaviors: 1) Must be a valid service slug (e.g., "heroku-postgresql", "heroku-redis", etc.), 2) Can be obtained from the list_addon_services command output. |
Implementation Reference
- src/tools/addons.ts:198-208 (handler)Handler function that constructs the 'addons:plans' CLI command with the provided service and optional json flag, executes it via HerokuREPL, and returns processed output.async (options: ListAddonPlansOptions): Promise<McpToolResponse> => { const command = new CommandBuilder(TOOL_COMMAND_MAP.LIST_ADDON_PLANS) .addFlags({ json: options.json }) .addPositionalArguments({ service: options.service }) .build(); const output = await herokuRepl.executeCommand(command); return handleCliOutput(output); }
- src/tools/addons.ts:177-185 (schema)Zod schema defining input parameters: service (string, required), json (boolean, optional). Includes inferred TypeScript type.export const listAddonPlansOptionsSchema = z.object({ service: z.string().describe('Service slug (e.g., heroku-postgresql). Get from list_addon_services'), json: z.boolean().optional().describe('JSON output with pricing, features, space compatibility. Default: text format') }); /** * Type definition for the options used when listing add-on service plans. */ export type ListAddonPlansOptions = z.infer<typeof listAddonPlansOptionsSchema>;
- src/tools/addons.ts:193-210 (registration)Registration function that calls server.tool to register 'list_addon_plans' with schema and handler.export const registerListAddonPlansTool = (server: McpServer, herokuRepl: HerokuREPL): void => { server.tool( 'list_addon_plans', 'List service plans: features, pricing, availability', listAddonPlansOptionsSchema.shape, async (options: ListAddonPlansOptions): Promise<McpToolResponse> => { const command = new CommandBuilder(TOOL_COMMAND_MAP.LIST_ADDON_PLANS) .addFlags({ json: options.json }) .addPositionalArguments({ service: options.service }) .build(); const output = await herokuRepl.executeCommand(command); return handleCliOutput(output); } ); };
- src/index.ts:73-73 (registration)Top-level call to register the list_addon_plans tool during server initialization.addons.registerListAddonPlansTool(server, herokuRepl);
- src/utils/tool-commands.ts:28-28 (helper)Constant mapping for the CLI command string used in the handler.LIST_ADDON_PLANS: 'addons:plans',