Skip to main content
Glama
lkb2k

Gradle Tomcat MCP Server

by lkb2k

get_tomcat_status

Check the current status of the Tomcat process to monitor its operational state and ensure proper functionality.

Instructions

Check Tomcat process status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Tool handler implementation in handleToolCall switch statement, delegates to processManager.getStatus()
    case "get_tomcat_status":
      return processManager.getStatus();
  • Tool definition including name, description, and empty input schema (no parameters required)
    {
      name: "get_tomcat_status",
      description: "Check Tomcat process status",
      inputSchema: {
        type: "object",
        properties: {}
      }
    },
  • src/server.js:47-51 (registration)
    MCP tool registration via ListToolsRequestHandler, exposes TOOLS array containing get_tomcat_status schema
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: TOOLS
      };
    });
  • ProcessManager.getStatus() method providing the core logic for checking Tomcat status: running state, PID, uptime, 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'
      };
    }
  • Supporting getUptime() utility method used by getStatus() to format process uptime
    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`;
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Check Tomcat process status' implies a read-only, non-destructive operation, but it doesn't specify what 'status' includes (e.g., running/stopped, memory usage, uptime), potential errors (e.g., if Tomcat isn't installed), or side effects (e.g., minimal performance impact). For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description 'Check Tomcat process status' is a single, clear sentence with no wasted words. It's front-loaded with the core action and resource, making it immediately understandable. Every word earns its place, and there's no unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimal but incomplete. It lacks details on what the status check entails, possible return values (e.g., a status message or error), and how it fits into the sibling toolset (e.g., used before 'restart_tomcat'). For a tool with no structured output, the description should provide more context about the expected behavior and results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics beyond what the schema provides. A baseline score of 4 is appropriate as the description doesn't introduce confusion or redundancy regarding parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Check Tomcat process status' clearly states the verb ('Check') and resource ('Tomcat process status'), making the purpose immediately understandable. It distinguishes from siblings like 'get_logs' (which retrieves log files) and 'restart_tomcat' (which performs an action), though it doesn't explicitly differentiate from them. The description is specific but lacks explicit sibling comparison.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., Tomcat must be installed), when it's appropriate (e.g., for monitoring vs. troubleshooting), or contrast with siblings like 'get_logs' for deeper diagnostics. Usage is implied by the name but not articulated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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