Skip to main content
Glama
heroku

Heroku MCP server

Official
by heroku

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
NameRequiredDescriptionDefault
jsonNoControls 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.
serviceYesIdentifies 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

  • 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);
    }
  • 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>;
  • 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);
  • Constant mapping for the CLI command string used in the handler.
    LIST_ADDON_PLANS: 'addons:plans',

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