list_private_spaces
View and manage Heroku Private Spaces with detailed metadata, including CIDR blocks, regions, compliance features, and capacity. Supports JSON output for enterprise space management. Essential for administrators.
Instructions
List Heroku Private Spaces available to the user. Use this tool when you need to: 1) View all private spaces, 2) Get space details like CIDR blocks and regions, 3) Check space compliance features, or 4) View space capacity information. Supports JSON output for detailed metadata. Essential for enterprise space management.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | No | Controls the output format. When true, returns a detailed JSON response containing private space metadata such as generation's unsupported features, IPv4 and IPv6 CIDR blocks. When false or omitted, returns a simplified text format. |
Implementation Reference
- src/tools/spaces.ts:37-42 (handler)The async handler function for the 'list_private_spaces' tool. It constructs a Heroku CLI 'spaces' command with optional JSON flag, executes it using the HerokuREPL, and returns the processed output via handleCliOutput.async (options: ListPrivateSpacesOptions): Promise<McpToolResponse> => { const command = new CommandBuilder(TOOL_COMMAND_MAP.LIST_PRIVATE_SPACES).addFlags({ json: options.json }).build(); const output = await herokuRepl.executeCommand(command); return handleCliOutput(output); }
- src/tools/spaces.ts:14-16 (schema)Zod schema defining the optional 'json' boolean parameter for controlling output format.export const listPrivateSpacesOptionsSchema = z.object({ json: z.boolean().optional().describe('JSON output for detailed space metadata, text output if false/omitted') });
- src/tools/spaces.ts:32-44 (registration)Function that registers the 'list_private_spaces' tool with the MCP server, including name, description, schema, and inline handler.export const registerListPrivateSpacesTool = (server: McpServer, herokuRepl: HerokuREPL): void => { server.tool( 'list_private_spaces', 'Lists Heroku Private Spaces with CIDR blocks, regions, compliance and capacity details. JSON output supported.', listPrivateSpacesOptionsSchema.shape, async (options: ListPrivateSpacesOptions): Promise<McpToolResponse> => { const command = new CommandBuilder(TOOL_COMMAND_MAP.LIST_PRIVATE_SPACES).addFlags({ json: options.json }).build(); const output = await herokuRepl.executeCommand(command); return handleCliOutput(output); } ); };
- src/index.ts:63-63 (registration)Top-level call to register the list_private_spaces tool during server initialization.spaces.registerListPrivateSpacesTool(server, herokuRepl);
- src/utils/tool-commands.ts:18-18 (helper)TOOL_COMMAND_MAP entry mapping LIST_PRIVATE_SPACES to the Heroku CLI 'spaces' command.LIST_PRIVATE_SPACES: 'spaces',