Skip to main content
Glama
heroku

Heroku MCP server

Official
by heroku

pg_backups

Manage and monitor Heroku app database backups using this tool. View existing backups, track progress, verify availability, and ensure disaster recovery readiness.

Instructions

Manage database backup operations and schedules. Use this tool when you need to: 1) View existing database backups, 2) Monitor backup schedules and status, 3) Track backup operation progress, 4) Verify backup availability. The tool helps maintain database backup operations and disaster recovery readiness.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appYesThe name of the Heroku app whose backups to manage.

Implementation Reference

  • The handler function for the 'pg_backups' tool. It constructs a CommandBuilder for 'pg:backups' with the app flag and executes it via herokuRepl, returning formatted output.
    async (options: PgBackupsOptions): Promise<McpToolResponse> => { const command = new CommandBuilder(TOOL_COMMAND_MAP.PG_BACKUPS) .addFlags({ app: options.app }) .build(); const output = await herokuRepl.executeCommand(command); return handleCliOutput(output); }
  • Zod schema defining the input parameters for the pg_backups tool: requires 'app' string.
    export const pgBackupsOptionsSchema = z.object({ app: z.string().describe('Target app name') }); export type PgBackupsOptions = z.infer<typeof pgBackupsOptionsSchema>;
  • The registration function for the pg_backups tool, which calls server.tool with name, description, schema, and inline handler.
    export const registerPgBackupsTool = (server: McpServer, herokuRepl: HerokuREPL): void => { server.tool( 'pg_backups', 'Manage backups: schedules, status, verification, recovery', pgBackupsOptionsSchema.shape, async (options: PgBackupsOptions): Promise<McpToolResponse> => { const command = new CommandBuilder(TOOL_COMMAND_MAP.PG_BACKUPS) .addFlags({ app: options.app }) .build(); const output = await herokuRepl.executeCommand(command); return handleCliOutput(output); } ); };
  • src/index.ts:84-84 (registration)
    Invocation of the registerPgBackupsTool during server initialization.
    data.registerPgBackupsTool(server, herokuRepl);
  • Constant mapping the PG_BACKUPS key to the Heroku CLI command 'pg:backups' used in the handler.
    PG_BACKUPS: 'pg:backups',

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