list_addon_services
View all available Heroku add-on services with basic details or a detailed JSON response for additional metadata. Use this to quickly identify and manage add-on options for your Heroku applications.
Instructions
List available Heroku add-on services. Use this tool when you need to view all available add-on services. Returns a list of add-on services with their basic information.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | No | Controls the output format. When true, returns a detailed JSON response containing additional add-on service metadata such as sharing options and supported app generations. When false or omitted, returns a simplified text format including only the add-on service slug, name and state. |
Implementation Reference
- src/tools/addons.ts:161-170 (handler)Handler function for list_addon_services tool. Builds CLI command using 'addons:services' mapped in TOOL_COMMAND_MAP, optionally with json flag, executes via HerokuREPL, and processes output.async (options: ListAddonServicesOptions): Promise<McpToolResponse> => { const command = new CommandBuilder(TOOL_COMMAND_MAP.LIST_ADDON_SERVICES) .addFlags({ json: options.json }) .build(); const output = await herokuRepl.executeCommand(command); return handleCliOutput(output); }
- src/tools/addons.ts:138-143 (schema)Zod schema defining input options for list_addon_services tool: optional json boolean flag.export const listAddonServicesOptionsSchema = z.object({ json: z .boolean() .optional() .describe('JSON output with sharing options and app generation support. Default: basic text') });
- src/tools/addons.ts:156-172 (registration)Registration function that registers the list_addon_services tool on the MCP server with name, description, schema, and handler.export const registerListAddonServicesTool = (server: McpServer, herokuRepl: HerokuREPL): void => { server.tool( 'list_addon_services', 'List available add-on services and features', listAddonServicesOptionsSchema.shape, async (options: ListAddonServicesOptions): Promise<McpToolResponse> => { const command = new CommandBuilder(TOOL_COMMAND_MAP.LIST_ADDON_SERVICES) .addFlags({ json: options.json }) .build(); const output = await herokuRepl.executeCommand(command); return handleCliOutput(output); } ); };
- src/index.ts:72-72 (registration)Top-level call to register the list_addon_services tool during server initialization.addons.registerListAddonServicesTool(server, herokuRepl);
- src/utils/tool-commands.ts:27-27 (helper)Constant mapping for the CLI command used by list_addon_services handler: 'addons:services'.LIST_ADDON_SERVICES: 'addons:services',