@heroku/mcp-server 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -476,38 +476,16 @@ export class DeployToHeroku extends AbortController {
476
476
  */
477
477
  export const deployToHerokuSchema = z
478
478
  .object({
479
- name: z
479
+ name: z.string().min(5).max(30).describe('App name for deployment. Creates new app if not exists.'),
480
+ rootUri: z.string().min(1).describe('Workspace root directory path.'),
481
+ tarballUri: z.string().optional().describe('URL of deployment tarball. Creates from rootUri if not provided.'),
482
+ teamId: z.string().optional().describe('Team ID for team deployments.'),
483
+ spaceId: z.string().optional().describe('Private space ID for space deployments.'),
484
+ internalRouting: z.boolean().optional().describe('Enable internal routing in private spaces.'),
485
+ env: z.record(z.string(), z.any()).optional().describe('Environment variables overriding app.json values'),
486
+ appJson: z
480
487
  .string()
481
- .min(5)
482
- .max(30)
483
- .describe('Heroku application name for deployment target. If omitted, a new app will be created with a random name. If supplied and the app does not exist, the tool will create a new app with the given name.'),
484
- rootUri: z
485
- .string()
486
- .min(1)
487
- .describe("The absolute path of the user's workspace unless otherwise specified by the user. Must be a string that can be resolved to a valid directory using node's path module."),
488
- tarballUri: z
489
- .string()
490
- .optional()
491
- .describe('The URL of the tarball to deploy. If not provided, the rootUri must be provided and the tool will create a new tarball from the contents of the rootUri.'),
492
- teamId: z
493
- .string()
494
- .optional()
495
- .describe('Heroku team identifier for team-scoped deployments. Use teams_list tool to get a list of teams if needed.'),
496
- spaceId: z
497
- .string()
498
- .optional()
499
- .describe('Heroku private space identifier for space-scoped deployments. Use spaces_list tool to get a list of spaces if needed.'),
500
- internalRouting: z
501
- .boolean()
502
- .optional()
503
- .describe('Enables internal routing within private spaces. Use this flag when you need to configure private spaces for internal routing.'),
504
- env: z
505
- .record(z.string(), z.any())
506
- .optional()
507
- .describe('Key-value pairs of environment variables for the deployment that override the ones in app.json'),
508
- appJson: z.string()
509
- .describe(`Stringified app.json configuration for deployment. Used for dynamic configurations or converted projects.
510
- The app.json string must be valid and conform to the following schema: ${JSON.stringify(appJsonSchema, null, 0)}`)
488
+ .describe(`App.json config for deployment. Must follow schema: ${JSON.stringify(appJsonSchema, null, 0)}`)
511
489
  })
512
490
  .strict();
513
491
  /**
@@ -519,14 +497,8 @@ export const deployToHerokuSchema = z
519
497
  * @param server - The MCP server instance to register the tool with
520
498
  */
521
499
  export const registerDeployToHerokuTool = (server) => {
522
- server.tool('deploy_to_heroku', 'Deploy projects to Heroku, replaces manual git push workflows. Use this tool when you need to: ' +
523
- '1) Deploy a new application with specific app.json configuration, 2) Update an existing application with new code, ' +
524
- '3) Configure team or private space deployments, or 4) Set up environment-specific configurations. ' +
525
- 'Important: Check for an app.json file first. If an app.json does not exist in the workspace, you must create one and pass it in via the appJson parameter. ' +
526
- 'The tool handles app creation, source code deployment, and environment setup. ' +
527
- 'Requires valid app.json in workspace or provided via configuration. ' +
528
- 'Supports team deployments, private spaces, and custom environment variables.' +
529
- 'Use apps_list tool with the "all" param to get a list of apps for the user to choose from when deploying to an existing app and the app name was not provided.', deployToHerokuSchema.shape, async (options) => {
500
+ server.tool('deploy_to_heroku', 'Use for all deployments. Deploys new/existing apps, with or without teams/spaces, and env vars to Heroku. ' +
501
+ 'Ask for app name if missing. Requires valid app.json via appJson param.', deployToHerokuSchema.shape, async (options) => {
530
502
  const deployToHeroku = new DeployToHeroku();
531
503
  const result = await deployToHeroku.run({
532
504
  rootUri: options.rootUri,
@@ -557,47 +529,45 @@ export const registerDeployToHerokuTool = (server) => {
557
529
  // Define the schema for deploying to a one-off dyno
558
530
  export const deployOneOffDynoSchema = z
559
531
  .object({
560
- name: z.string().min(5).max(30).describe('Name of the Heroku app for the one-off dyno.'),
561
- command: z.string().describe('Command to execute in the one-off dyno.'),
532
+ name: z.string().min(5).max(30).describe('Target Heroku app name.'),
533
+ command: z.string().describe('Command to run in dyno.'),
562
534
  sources: z
563
535
  .array(z.object({
564
- relativePath: z
565
- .string()
566
- .describe('A virtual path to the source file used to create the tarball entry for this file.'),
567
- contents: z.string().describe('Contents of the source file represented as a string.')
536
+ relativePath: z.string().describe('Virtual path for tarball entry.'),
537
+ contents: z.string().describe('File contents.')
568
538
  }))
569
539
  .optional()
570
- .describe('Array of objects representing the source files to include in the dyno.'),
571
- size: z.string().optional().describe('Dyno size (optional).').default('standard-1x'),
572
- timeToLive: z.number().optional().describe('Dyno lifespan in seconds (optional).').default(3600),
573
- env: z.record(z.string(), z.any()).optional().describe('Environment variables for the dyno (optional).')
540
+ .describe('Source files to include in dyno.'),
541
+ size: z.string().optional().describe('Dyno size.').default('standard-1x'),
542
+ timeToLive: z.number().optional().describe('Dyno lifetime in seconds.').default(3600),
543
+ env: z.record(z.string(), z.any()).optional().describe('Dyno environment variables.')
574
544
  })
575
545
  .strict();
576
- export const execToolSchemaDescription = `
577
- Execute code or a command on a Heroku one-off dyno in a sandboxed environment with network and filesystem access.
546
+ const execToolSchemaDescription = `
547
+ Run code/commands in Heroku one-off dyno with network and filesystem access.
578
548
 
579
- **Requirements:**
580
- - Display command output to the user.
581
- - Determine app language using the 'app_info' tool to identify the Heroku buildpack.
582
- - Use shell commands for environment setup (e.g., package installations) before execution.
583
- - Output must utilize standard input/output.
549
+ Requirements:
550
+ - Show command output
551
+ - Use app_info for buildpack detection
552
+ - Support shell setup commands
553
+ - Use stdout/stderr
584
554
 
585
- **Capabilities:**
586
- - Network and filesystem access
587
- - Environment variables support
588
- - File creation and execution in supported languages
589
- - Temporary directory management
555
+ Features:
556
+ - Network/filesystem access
557
+ - Environment variables
558
+ - File operations
559
+ - Temp directory handling
590
560
 
591
- **Guidelines:**
592
- 1. Use the appropriate Heroku-supported language runtime.
593
- 2. Ensure correct syntax and module imports for the chosen language.
594
- 3. Organize code into classes/functions, executed from the top level.
595
- 4. For external packages:
596
- - Specify in the appropriate package manager file.
597
- - Minimize dependencies.
598
- - Prefer native modules when possible.
561
+ Usage:
562
+ 1. Use Heroku runtime
563
+ 2. Proper syntax/imports
564
+ 3. Organized code structure
565
+ 4. Package management:
566
+ - Define dependencies
567
+ - Minimize external deps
568
+ - Prefer native modules
599
569
 
600
- **Example (Node.js package manager file):**
570
+ Example package.json:
601
571
  \`\`\`json
602
572
  {
603
573
  "type": "module",
@@ -3,50 +3,22 @@ import { handleCliOutput } from '../utils/handle-cli-output.js';
3
3
  import { CommandBuilder } from '../utils/command-builder.js';
4
4
  import { TOOL_COMMAND_MAP } from '../utils/tool-commands.js';
5
5
  /**
6
- * Schema for retrieving application logs with various filtering and output options.
7
- * This schema defines the structure and validation rules for the logs operation.
6
+ * Schema for app logs retrieval with filtering options
8
7
  */
9
8
  export const getAppGetAppLogsOptionsSchema = z.object({
10
- app: z
11
- .string()
12
- .describe('Specifies the target Heroku app whose logs to retrieve. Requirements and behaviors: ' +
13
- '1) App must exist and be accessible to you with appropriate permissions, ' +
14
- '2) The response includes both system events and application output, ' +
15
- "3) Currently it's only available to Cedar generation apps."),
16
- dynoName: z
17
- .string()
18
- .optional()
19
- .describe('Filter logs by specific dyno instance. Important behaviors: ' +
20
- '1) Format is "process_type.instance_number" (e.g., "web.1", "worker.2"). ' +
21
- '2) You cannot specify both dynoName and processType parameters together. ' +
22
- 'Best practice: Use when debugging specific dyno behavior or performance issues.'),
23
- source: z
24
- .string()
25
- .optional()
26
- .describe('Filter logs by their origin. Key characteristics: ' +
27
- '1) Common values: "app" (application logs), "heroku" (platform events), ' +
28
- '2) When omitted, shows logs from all sources. ' +
29
- 'Best practice: Use "app" for application debugging, "heroku" for platform troubleshooting.'),
30
- processType: z
31
- .string()
32
- .optional()
33
- .describe('Filter logs by process type. Key characteristics: ' +
34
- '1) Common values: "web" (web dynos), "worker" (background workers), ' +
35
- '2) Shows logs from all instances of the specified process type, ' +
36
- '3) You cannot specify both dynoName and processType parameters together. ' +
37
- 'Best practice: Use when debugging issues specific to web or worker processes.')
9
+ app: z.string().describe('Heroku app name. Requires: permissions, Cedar-gen'),
10
+ dynoName: z.string().optional().describe('Format: web.1/worker.2. Excludes processType'),
11
+ source: z.string().optional().describe('app=application, heroku=platform. Default: all'),
12
+ processType: z.string().optional().describe('web|worker. All instances. Excludes dynoName')
38
13
  });
39
14
  /**
40
- * Registers the get app logs tool with the MCP server.
41
- * This tool provides access to application logs with various filtering options.
15
+ * Registers app logs tool with MCP server
42
16
  *
43
- * @param server - The MCP server instance to register the tool with
44
- * @param herokuRepl - The Heroku REPL instance for executing commands
17
+ * @param server MCP server instance
18
+ * @param herokuRepl Heroku REPL instance
45
19
  */
46
20
  export const registerGetAppLogsTool = (server, herokuRepl) => {
47
- server.tool('get_app_logs', 'View application logs with flexible filtering options. Use this tool when you need to: ' +
48
- '1) Monitor application activity in real-time, 2) Debug issues by viewing recent logs, ' +
49
- '3) Filter logs by dyno, process type, or source.', getAppGetAppLogsOptionsSchema.shape, async (options) => {
21
+ server.tool('get_app_logs', 'App logs: monitor/debug/filter by dyno/process/source', getAppGetAppLogsOptionsSchema.shape, async (options) => {
50
22
  const command = new CommandBuilder(TOOL_COMMAND_MAP.LOGS)
51
23
  .addFlags({
52
24
  app: options.app,
@@ -7,9 +7,7 @@ import { TOOL_COMMAND_MAP } from '../utils/tool-commands.js';
7
7
  * This schema defines the structure and validation rules for both enabling and disabling maintenance mode.
8
8
  */
9
9
  export const maintenanceModeOptionsSchema = z.object({
10
- app: z
11
- .string()
12
- .describe('The name of the Heroku app to modify maintenance mode for. This must be an existing app that you have access to.')
10
+ app: z.string().describe('Target Heroku app name')
13
11
  });
14
12
  /**
15
13
  * Registers the maintenance_on tool with the MCP server.
@@ -19,10 +17,7 @@ export const maintenanceModeOptionsSchema = z.object({
19
17
  * @param herokuRepl - The Heroku REPL instance for executing commands
20
18
  */
21
19
  export const registerMaintenanceOnTool = (server, herokuRepl) => {
22
- server.tool('maintenance_on', 'Enable maintenance mode for Heroku applications. Use this tool when you need to: ' +
23
- '1) Redirect traffic to a maintenance page, 2) Prepare for system updates or deployments, ' +
24
- '3) Schedule planned maintenance windows, 4) Gracefully handle service interruptions. ' +
25
- 'The tool manages traffic routing and process states while preserving running operations.', maintenanceModeOptionsSchema.shape, async (options) => {
20
+ server.tool('maintenance_on', 'Enable maintenance mode and redirect traffic for a Heroku app', maintenanceModeOptionsSchema.shape, async (options) => {
26
21
  const command = new CommandBuilder(TOOL_COMMAND_MAP.MAINTENANCE_ON)
27
22
  .addFlags({
28
23
  app: options.app
@@ -40,10 +35,7 @@ export const registerMaintenanceOnTool = (server, herokuRepl) => {
40
35
  * @param herokuRepl - The Heroku REPL instance for executing commands
41
36
  */
42
37
  export const registerMaintenanceOffTool = (server, herokuRepl) => {
43
- server.tool('maintenance_off', 'Disable maintenance mode for Heroku applications. Use this tool when you need to: ' +
44
- '1) Restore normal application traffic routing, 2) Resume dyno operations after maintenance, ' +
45
- '3) Complete deployment processes, 4) Verify application health after maintenance. ' +
46
- 'The tool handles service restoration and process resumption.', maintenanceModeOptionsSchema.shape, async (options) => {
38
+ server.tool('maintenance_off', 'Disable maintenance mode and restore normal app operations', maintenanceModeOptionsSchema.shape, async (options) => {
47
39
  const command = new CommandBuilder(TOOL_COMMAND_MAP.MAINTENANCE_OFF)
48
40
  .addFlags({
49
41
  app: options.app
@@ -6,38 +6,36 @@ import { TOOL_COMMAND_MAP } from '../utils/tool-commands.js';
6
6
  * Schema for creating a new pipeline.
7
7
  */
8
8
  export const pipelinesCreateOptionsSchema = z.object({
9
- name: z.string().describe('Name of the pipeline to create'),
10
- stage: z
11
- .enum(['development', 'staging', 'production'])
12
- .describe('Stage of first app in pipeline (e.g., production, staging, development)'),
13
- app: z.string().optional().describe('Name of the app to add to the pipeline'),
14
- team: z.string().optional().describe('Team to create the pipeline in')
9
+ name: z.string().describe('Pipeline name'),
10
+ stage: z.enum(['development', 'staging', 'production']).describe('Initial pipeline stage'),
11
+ app: z.string().optional().describe('App to add to pipeline'),
12
+ team: z.string().optional().describe('Team owning the pipeline')
15
13
  });
16
14
  /**
17
15
  * Schema for promoting apps through a pipeline.
18
16
  */
19
17
  export const pipelinesPromoteOptionsSchema = z.object({
20
- app: z.string().describe('Name of the app to promote from'),
21
- to: z.string().optional().describe('comma separated list of apps to promote to')
18
+ app: z.string().describe('Source app for promotion'),
19
+ to: z.string().optional().describe('Target apps for promotion (comma-separated)')
22
20
  });
23
21
  /**
24
22
  * Schema for listing pipelines.
25
23
  */
26
24
  export const pipelinesListOptionsSchema = z.object({
27
- json: z.boolean().optional().describe('Output in json format')
25
+ json: z.boolean().optional().describe('Enable JSON output')
28
26
  });
29
27
  /**
30
28
  * Schema for getting pipeline information.
31
29
  */
32
30
  export const pipelinesInfoOptionsSchema = z.object({
33
- pipeline: z.string().describe('Name of the pipeline to get info for'),
34
- json: z.boolean().optional().describe('Output in json format')
31
+ pipeline: z.string().describe('Target pipeline name'),
32
+ json: z.boolean().optional().describe('Enable JSON output')
35
33
  });
36
34
  /**
37
35
  * Schema for the base pipelines command.
38
36
  */
39
37
  export const pipelinesOptionsSchema = z.object({
40
- json: z.boolean().optional().describe('Output in json format')
38
+ json: z.boolean().optional().describe('Enable JSON output')
41
39
  });
42
40
  /**
43
41
  * Registers the pipelines:create tool with the MCP server.
@@ -46,10 +44,7 @@ export const pipelinesOptionsSchema = z.object({
46
44
  * @param herokuRepl - The Heroku REPL instance.
47
45
  */
48
46
  export const registerPipelinesCreateTool = (server, herokuRepl) => {
49
- server.tool('pipelines_create', 'Create new Heroku deployment pipelines. Use this tool when you need to: ' +
50
- '1) Set up new deployment workflows, 2) Create staged application environments, ' +
51
- '3) Organize apps by development stages, 4) Configure team-based pipeline structures. ' +
52
- 'The tool manages pipeline creation with optional team and initial app configuration.', pipelinesCreateOptionsSchema.shape, async (options) => {
47
+ server.tool('pipelines_create', 'Creates new Heroku deployment pipeline with configurable stages, apps, and team settings', pipelinesCreateOptionsSchema.shape, async (options) => {
53
48
  const command = new CommandBuilder(TOOL_COMMAND_MAP.PIPELINES_CREATE)
54
49
  .addFlags({
55
50
  stage: options.stage,
@@ -69,10 +64,7 @@ export const registerPipelinesCreateTool = (server, herokuRepl) => {
69
64
  * @param herokuRepl - The Heroku REPL instance.
70
65
  */
71
66
  export const registerPipelinesPromoteTool = (server, herokuRepl) => {
72
- server.tool('pipelines_promote', 'Promote applications through pipeline stages. Use this tool when you need to: ' +
73
- '1) Deploy code to staging or production environments, 2) Manage staged releases, ' +
74
- '3) Coordinate multi-app promotions, 4) Control deployment workflows. ' +
75
- 'The tool handles safe promotion of apps between pipeline stages.', pipelinesPromoteOptionsSchema.shape, async (options) => {
67
+ server.tool('pipelines_promote', 'Promotes apps between pipeline stages with configurable target applications', pipelinesPromoteOptionsSchema.shape, async (options) => {
76
68
  const command = new CommandBuilder(TOOL_COMMAND_MAP.PIPELINES_PROMOTE)
77
69
  .addFlags({
78
70
  app: options.app,
@@ -90,10 +82,7 @@ export const registerPipelinesPromoteTool = (server, herokuRepl) => {
90
82
  * @param herokuRepl - The Heroku REPL instance.
91
83
  */
92
84
  export const registerPipelinesListTool = (server, herokuRepl) => {
93
- server.tool('pipelines_list', 'View available Heroku pipelines. Use this tool when you need to: ' +
94
- '1) List accessible pipelines, 2) Check pipeline ownership and access, ' +
95
- '3) View pipeline organization, 4) Find specific pipeline configurations. ' +
96
- 'The tool provides pipeline visibility with optional JSON output format.', pipelinesListOptionsSchema.shape, async (options) => {
85
+ server.tool('pipelines_list', 'Lists accessible Heroku pipelines with ownership and configuration details', pipelinesListOptionsSchema.shape, async (options) => {
97
86
  const command = new CommandBuilder(TOOL_COMMAND_MAP.PIPELINES)
98
87
  .addFlags({
99
88
  json: options.json
@@ -110,10 +99,7 @@ export const registerPipelinesListTool = (server, herokuRepl) => {
110
99
  * @param herokuRepl - The Heroku REPL instance.
111
100
  */
112
101
  export const registerPipelinesInfoTool = (server, herokuRepl) => {
113
- server.tool('pipelines_info', 'Display detailed pipeline configuration. Use this tool when you need to: ' +
114
- '1) View pipeline stage configuration, 2) Check connected applications, ' +
115
- '3) Verify pipeline settings, 4) Monitor pipeline status. ' +
116
- 'The tool provides comprehensive pipeline information and structure details.', pipelinesInfoOptionsSchema.shape, async (options) => {
102
+ server.tool('pipelines_info', 'Displays detailed pipeline configuration, stages, and connected applications', pipelinesInfoOptionsSchema.shape, async (options) => {
117
103
  const command = new CommandBuilder(TOOL_COMMAND_MAP.PIPELINES_INFO)
118
104
  .addFlags({
119
105
  json: options.json
@@ -131,10 +117,7 @@ export const registerPipelinesInfoTool = (server, herokuRepl) => {
131
117
  * @param herokuRepl - The Heroku REPL instance.
132
118
  */
133
119
  export const registerPipelinesTool = (server, herokuRepl) => {
134
- server.tool('pipelines', 'List and manage Heroku pipelines. Use this tool when you need to: ' +
135
- '1) View all accessible pipelines, 2) Monitor pipeline configurations, ' +
136
- '3) Check pipeline availability, 4) Review pipeline organization. ' +
137
- 'The tool provides high-level pipeline management and visibility.', pipelinesOptionsSchema.shape, async (options) => {
120
+ server.tool('pipelines', 'Lists and manages Heroku pipelines with configuration visibility', pipelinesOptionsSchema.shape, async (options) => {
138
121
  const command = new CommandBuilder('pipelines')
139
122
  .addFlags({
140
123
  json: options.json
package/dist/tools/ps.js CHANGED
@@ -6,32 +6,29 @@ import { TOOL_COMMAND_MAP } from '../utils/tool-commands.js';
6
6
  * Schema for listing processes.
7
7
  */
8
8
  export const psListOptionsSchema = z.object({
9
- app: z.string().describe('Name of the app to list processes for'),
10
- json: z.boolean().optional().describe('Return process information in json format')
9
+ app: z.string().describe('App name to list processes for'),
10
+ json: z.boolean().optional().describe('Output process info in JSON format')
11
11
  });
12
12
  /**
13
13
  * Schema for scaling processes.
14
14
  */
15
15
  export const psScaleOptionsSchema = z.object({
16
- app: z.string().describe('Name of the app to scale'),
16
+ app: z.string().describe('App name to scale'),
17
17
  dyno: z
18
18
  .string()
19
19
  .optional()
20
- .describe('The type and quantity of dynos to scale (e.g., web=3:Standard-2X, worker+1). Omit to display current formation.')
20
+ .describe('Dyno type and quantity (e.g., web=3:Standard-2X, worker+1). Omit to show current formation')
21
21
  });
22
22
  /**
23
23
  * Schema for restarting processes.
24
24
  */
25
25
  export const psRestartOptionsSchema = z.object({
26
- app: z.string().describe('Name of the app to restart processes for'),
26
+ app: z.string().describe('App name to restart processes for'),
27
27
  'dyno-name': z
28
28
  .string()
29
29
  .optional()
30
- .describe('Specific dyno to restart (e.g., web.1). If neither dyno-name nor process-type specified, restarts all dynos'),
31
- 'process-type': z
32
- .string()
33
- .optional()
34
- .describe('Type of dynos to restart (e.g., web). If neither dyno-name nor process-type specified, restarts all dynos')
30
+ .describe('Specific dyno to restart (e.g., web.1). Omit both options to restart all'),
31
+ 'process-type': z.string().optional().describe('Dyno type to restart (e.g., web). Omit both options to restart all')
35
32
  });
36
33
  /**
37
34
  * Registers the ps tool with the MCP server.
@@ -40,10 +37,7 @@ export const psRestartOptionsSchema = z.object({
40
37
  * @param herokuRepl - The Heroku REPL instance.
41
38
  */
42
39
  export const registerPsListTool = (server, herokuRepl) => {
43
- server.tool('ps_list', 'List and monitor Heroku application dynos. Use this tool when you need to: ' +
44
- '1) View all running dynos for an app, 2) Check dyno status and health, ' +
45
- '3) Monitor application process states, 4) Verify dyno configurations. ' +
46
- 'The tool provides process visibility with optional JSON output format.', psListOptionsSchema.shape, async (options) => {
40
+ server.tool('ps_list', 'List and monitor Heroku app dynos. View running dynos, check status/health, monitor process states, verify configurations.', psListOptionsSchema.shape, async (options) => {
47
41
  const command = new CommandBuilder(TOOL_COMMAND_MAP.PS)
48
42
  .addFlags({
49
43
  app: options.app,
@@ -61,10 +55,7 @@ export const registerPsListTool = (server, herokuRepl) => {
61
55
  * @param herokuRepl - The Heroku REPL instance.
62
56
  */
63
57
  export const registerPsScaleTool = (server, herokuRepl) => {
64
- server.tool('ps_scale', 'Scale and resize Heroku application dynos. Use this tool when you need to: ' +
65
- '1) Adjust dyno quantities up or down, 2) Change dyno sizes for performance, ' +
66
- '3) View current formation details, 4) Manage resource allocation. ' +
67
- 'The tool handles dyno scaling with support for type-specific adjustments.', psScaleOptionsSchema.shape, async (options) => {
58
+ server.tool('ps_scale', 'Scale Heroku app dynos. Adjust quantities, change sizes, view formation details, manage resources.', psScaleOptionsSchema.shape, async (options) => {
68
59
  const command = new CommandBuilder(TOOL_COMMAND_MAP.PS_SCALE)
69
60
  .addFlags({
70
61
  app: options.app
@@ -82,10 +73,7 @@ export const registerPsScaleTool = (server, herokuRepl) => {
82
73
  * @param herokuRepl - The Heroku REPL instance.
83
74
  */
84
75
  export const registerPsRestartTool = (server, herokuRepl) => {
85
- server.tool('ps_restart', 'Restart Heroku application processes. Use this tool when you need to: ' +
86
- '1) Restart specific dynos by name, 2) Restart all dynos of a process type, ' +
87
- '3) Perform full application restarts, 4) Reset dyno states selectively. ' +
88
- 'The tool manages process restarts with flexible targeting options.', psRestartOptionsSchema.shape, async (options) => {
76
+ server.tool('ps_restart', 'Restart Heroku app processes. Restart specific dynos, process types, or all dynos. Reset dyno states selectively.', psRestartOptionsSchema.shape, async (options) => {
89
77
  const command = new CommandBuilder(TOOL_COMMAND_MAP.PS_RESTART)
90
78
  .addFlags({
91
79
  app: options.app,
@@ -7,12 +7,7 @@ import { TOOL_COMMAND_MAP } from '../utils/tool-commands.js';
7
7
  * This schema defines the structure and validation rules for the list private spaces operation.
8
8
  */
9
9
  export const listPrivateSpacesOptionsSchema = z.object({
10
- json: z
11
- .boolean()
12
- .optional()
13
- .describe('Controls the output format. When true, returns a detailed JSON response containing private space metadata ' +
14
- "such as generation's unsupported features, IPv4 and IPv6 CIDR blocks. When false or omitted, returns a " +
15
- 'simplified text format.')
10
+ json: z.boolean().optional().describe('JSON output for detailed space metadata, text output if false/omitted')
16
11
  });
17
12
  /**
18
13
  * Registers the list_private_spaces tool with the MCP server.
@@ -23,10 +18,7 @@ export const listPrivateSpacesOptionsSchema = z.object({
23
18
  * @param herokuRepl - The Heroku REPL instance for executing commands
24
19
  */
25
20
  export const registerListPrivateSpacesTool = (server, herokuRepl) => {
26
- server.tool('list_private_spaces', 'List Heroku Private Spaces available to the user. Use this tool when you need to: ' +
27
- '1) View all private spaces, 2) Get space details like CIDR blocks and regions, ' +
28
- '3) Check space compliance features, or 4) View space capacity information. ' +
29
- 'Supports JSON output for detailed metadata. Essential for enterprise space management.', listPrivateSpacesOptionsSchema.shape, async (options) => {
21
+ server.tool('list_private_spaces', 'Lists Heroku Private Spaces with CIDR blocks, regions, compliance and capacity details. JSON output supported.', listPrivateSpacesOptionsSchema.shape, async (options) => {
30
22
  const command = new CommandBuilder(TOOL_COMMAND_MAP.LIST_PRIVATE_SPACES).addFlags({ json: options.json }).build();
31
23
  const output = await herokuRepl.executeCommand(command);
32
24
  return handleCliOutput(output);
@@ -13,8 +13,7 @@ export const listTeamsOptionsSchema = z.object({
13
13
  json: z
14
14
  .boolean()
15
15
  .optional()
16
- .describe('Controls the output format. When true, returns a detailed JSON response containing team metadata such as ' +
17
- 'enterprise account name. When false or omitted, returns a simplified text format.')
16
+ .describe('Output format control - true for detailed JSON with team metadata, false/omitted for simplified text')
18
17
  });
19
18
  /**
20
19
  * Registers the list_teams tool with the MCP server.
@@ -25,11 +24,7 @@ export const listTeamsOptionsSchema = z.object({
25
24
  * @param herokuRepl - The Heroku REPL instance for executing commands
26
25
  */
27
26
  export const registerListTeamsTool = (server, herokuRepl) => {
28
- server.tool('list_teams', 'List Heroku Teams the user belongs to. Use this tool when you need to: ' +
29
- '1) View all accessible teams, 2) Check team membership, ' +
30
- '3) Get team metadata and enterprise relationships, or ' +
31
- '4) Verify team access for app operations. ' +
32
- 'Supports JSON output for detailed team information.', listTeamsOptionsSchema.shape, async (options) => {
27
+ server.tool('list_teams', 'Lists accessible Heroku Teams. Use for: viewing teams, checking membership, getting team metadata, and verifying access. JSON output available.', listTeamsOptionsSchema.shape, async (options) => {
33
28
  const command = new CommandBuilder(TOOL_COMMAND_MAP.LIST_TEAMS).addFlags({ json: options.json }).build();
34
29
  const output = await herokuRepl.executeCommand(command);
35
30
  return handleCliOutput(output);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@heroku/mcp-server",
3
3
  "description": "Heroku Platform MCP Server",
4
- "version": "1.0.1",
4
+ "version": "1.0.3",
5
5
  "author": "Heroku",
6
6
  "bugs": "https://github.com/heroku/heroku-mcp-server/issues",
7
7
  "bin": {