Skip to main content
Glama
heroku

Heroku MCP server

Official
by heroku

rename_app

Change the name of a Heroku application or resolve naming conflicts by providing the current app name and a unique new name. Validates availability and manages the renaming process.

Instructions

Rename an existing Heroku application. Use this tool when a user needs to: 1) Change an app's name, or 2) Resolve naming conflicts. Requires both current app name and desired new name. The tool validates name availability and handles the rename process.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appYesThe current name of the Heroku app you want to rename. This must be an existing app that you have access to.
newNameYesThe new name you want to give to the app. Must be unique across all Heroku apps.

Implementation Reference

  • The asynchronous handler function that constructs a CommandBuilder for the 'apps:rename' Heroku CLI command using the provided app name and new name, executes it via the Heroku REPL, and processes the output.
    async (options: RenameAppOptions): Promise<McpToolResponse> => { const command = new CommandBuilder(TOOL_COMMAND_MAP.RENAME_APP) .addFlags({ app: options.app }) .addPositionalArguments({ newName: options.newName }) .build(); const output = await herokuRepl.executeCommand(command); return handleCliOutput(output); }
  • Zod schema defining the input parameters for the rename_app tool: 'app' (current app name) and 'newName' (desired new app name).
    export const renameAppOptionsSchema = z.object({ app: z.string().describe('Current app name. Requires access'), newName: z.string().describe('New unique app name') });
  • Function that registers the 'rename_app' tool on the MCP server, providing the tool name, description, input schema, and handler function.
    export const registerRenameAppTool = (server: McpServer, herokuRepl: HerokuREPL): void => { server.tool( 'rename_app', 'Rename app: validate and update app name', renameAppOptionsSchema.shape, async (options: RenameAppOptions): Promise<McpToolResponse> => { const command = new CommandBuilder(TOOL_COMMAND_MAP.RENAME_APP) .addFlags({ app: options.app }) .addPositionalArguments({ newName: options.newName }) .build(); const output = await herokuRepl.executeCommand(command); return handleCliOutput(output); } ); };
  • src/index.ts:53-53 (registration)
    Invocation of the registerRenameAppTool function during server initialization to add the tool to the MCP server.
    apps.registerRenameAppTool(server, herokuRepl);
  • Constant mapping the RENAME_APP key to the Heroku CLI command 'apps:rename', used by the CommandBuilder in the handler.
    RENAME_APP: 'apps:rename',

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