restart_tomcat
Stop and start Tomcat to restart Gradle-based applications, with options for forced termination and custom Gradle commands.
Instructions
Stop and start Tomcat
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Force termination during stop | |
| gradle_command | No | Gradle command for restart (default: appRun) |
Implementation Reference
- src/process-manager.js:97-109 (handler)Core implementation of restart_tomcat tool: stops Tomcat (optionally forcefully), waits 2 seconds, then starts it with optional Gradle command.async restartTomcat(force = false, gradleCommand = null) { const stopResult = await this.stopTomcat(force); await new Promise(resolve => setTimeout(resolve, 2000)); const startResult = await this.startTomcat(gradleCommand); return { stop: stopResult, start: startResult, success: true }; }
- src/tools/index.js:117-121 (handler)Tool dispatcher in handleToolCall: maps tool call to processManager.restartTomcat using input args.case "restart_tomcat": return await processManager.restartTomcat( args.force, args.gradle_command );
- src/tools/index.js:37-50 (schema)Input schema for restart_tomcat tool defining parameters force and gradle_command.inputSchema: { type: "object", properties: { force: { type: "boolean", description: "Force termination during stop", default: false }, gradle_command: { type: "string", description: "Gradle command for restart (default: appRun)" } } }
- src/tools/index.js:34-51 (registration)Registration of restart_tomcat tool in the TOOLS export array, including name, description, and schema.{ name: "restart_tomcat", description: "Stop and start Tomcat", inputSchema: { type: "object", properties: { force: { type: "boolean", description: "Force termination during stop", default: false }, gradle_command: { type: "string", description: "Gradle command for restart (default: appRun)" } } } },