Skip to main content
Glama
lkb2k

Gradle Tomcat MCP Server

by lkb2k

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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' }; }
  • 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: {} } },
  • Registration of the tool handler in the handleToolCall switch statement, delegating to ProcessManager.getStatus().
    case "get_tomcat_status": return processManager.getStatus();
  • 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`; } }

Other Tools

Related Tools

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/lkb2k/mcp-gradle'

If you have feedback or need assistance with the MCP directory API, please join our Discord server