Skip to main content
Glama
heroku

Heroku MCP server

Official
by heroku

get_addon_info

Retrieve detailed information about a Heroku add-on, including plan state, billing details, and configuration. Supports identifiers like add-on ID, name, or attachment name, requiring app context for attachments.

Instructions

Get comprehensive information about a Heroku add-on. Use this tool when you need to: 1) View add-on details, 2) Check plan details and state, 3) View billing information. Accepts add-on ID, name, or attachment name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addonYesIdentifies the add-on to retrieve information about. Accepts three types of identifiers: 1) Add-on ID (uuid format, works globally without app context), 2) Add-on name (e.g., "postgresql-curved-12345", works globally without app context), 3) Attachment name (e.g., "DATABASE", requires app context). Important behaviors: - When using attachment name, must provide app flag or have default app set, - Attachment name must be from the app where attached, not the provisioning app, - Add-on ID and unique names work with correct app context or without app context, - Must have access to the app where the add-on is either provisioned or attached.
appNoProvides application context for finding the add-on. Affects how the addon parameter is interpreted: 1) When provided: - Searches for the add-on only within this specific app, - Enables use of attachment names in the addon parameter, - Must have access to this app. 2) When omitted: - First tries using default app from Git remote configuration, - If no default app, addon parameter must be an ID or globally unique name, - Cannot use attachment names without app context. Best practice: Always provide when using attachment names.

Implementation Reference

  • The main handler function for the get_addon_info tool, which constructs the Heroku CLI command using CommandBuilder with the appropriate flags and arguments, executes it via the HerokuREPL, and processes the output.
    async (options: GetAddonInfoOptions): Promise<McpToolResponse> => { const command = new CommandBuilder(TOOL_COMMAND_MAP.GET_ADDON_INFO) .addFlags({ app: options.app }) .addPositionalArguments({ addon: options.addon }) .build(); const output = await herokuRepl.executeCommand(command); return handleCliOutput(output); }
  • Zod schema for input validation of get_addon_info tool parameters: 'addon' (string, required) and 'app' (string, optional).
    export const getAddonInfoOptionsSchema = z.object({ addon: z.string().describe('Add-on identifier: UUID, name (postgresql-curved-12345), or attachment name (DATABASE)'), app: z .string() .optional() .describe('App context for add-on lookup. Required for attachment names. Uses Git remote default') });
  • Registration function that calls server.tool() to register the 'get_addon_info' tool with the MCP server, providing name, description, input schema, and handler function.
    export const registerGetAddonInfoTool = (server: McpServer, herokuRepl: HerokuREPL): void => { server.tool( 'get_addon_info', 'Get add-on details: plan, state, billing', getAddonInfoOptionsSchema.shape, async (options: GetAddonInfoOptions): Promise<McpToolResponse> => { const command = new CommandBuilder(TOOL_COMMAND_MAP.GET_ADDON_INFO) .addFlags({ app: options.app }) .addPositionalArguments({ addon: options.addon }) .build(); const output = await herokuRepl.executeCommand(command); return handleCliOutput(output); } ); };
  • src/index.ts:70-70 (registration)
    Call to register the get_addon_info tool during MCP server initialization.
    addons.registerGetAddonInfoTool(server, herokuRepl);
  • TOOL_COMMAND_MAP constant defining the Heroku CLI command ('addons:info') used by the get_addon_info tool handler.
    GET_ADDON_INFO: 'addons:info',

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