get_tomcat_status
Monitor and verify the status of the Tomcat process within the Gradle Tomcat MCP Server to ensure proper application functionality.
Instructions
Check Tomcat process status
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/process-manager.js:111-129 (handler)Core handler function that returns the Tomcat process status: running state, PID, uptime (via helper), port, and gradle_command.getStatus() { if (!this.process) { return { running: false, pid: null, uptime: null, port: null, gradle_command: null }; } return { running: true, pid: this.process.pid, uptime: this.getUptime(), port: this.config.port || null, gradle_command: this.config.gradleCommand || 'appRun' }; }
- src/tools/index.js:52-59 (schema)Tool schema definition: empty input schema (no parameters), description, and name in the exported TOOLS array.{ name: "get_tomcat_status", description: "Check Tomcat process status", inputSchema: { type: "object", properties: {} } },
- src/tools/index.js:123-125 (registration)Registration of the tool handler in the handleToolCall switch statement, delegating to ProcessManager.getStatus().case "get_tomcat_status": return processManager.getStatus();
- src/process-manager.js:131-147 (helper)Helper function used by getStatus() to format the process uptime in human-readable format.getUptime() { if (!this.startTime) return null; const now = new Date(); const diff = now - this.startTime; const seconds = Math.floor(diff / 1000); const minutes = Math.floor(seconds / 60); const hours = Math.floor(minutes / 60); if (hours > 0) { return `${hours}h ${minutes % 60}m ${seconds % 60}s`; } else if (minutes > 0) { return `${minutes}m ${seconds % 60}s`; } else { return `${seconds}s`; } }