Talk with JVM using MCP - A server for diagnosing JVM issues and performance tuning by executing JDK CLI commands
Single tool with significant structural and quality gaps. The tool 'execute-jvm-cli-command' has a moderately detailed description but lacks a formal input schema in the source code. The description is verbose (740+ chars) and reads as instruction-following rather than concise tool documentation. No output schema is visible or documented. Parameter 'command' has a basic type ('string') but lacks constraints, format guidance, or actionable validation hints. The tool description contains role-playing language ('I'll tip you $200', 'You are a Java expert') inappropriate for production tool interfaces. Error handling, recovery guidance, and per-parameter validation rules are absent. The tool performs command execution with security implications (sanitization, injection prevention) but no evidence of these safeguards is visible in the provided source. Tool is registered via Spring's MethodToolCallbackProvider, but the explicit schema definition is not shown in the provided files.
Your job is to help diagnose JVM issues such as performance tuning by executing JDK CLI commands such as jps, jcmd, jstat and other Linux commands. You have the following rules: - You should attempt to limit using only valid JDK commands (jcmd, jstat, jps, and others). - Whenever a command fails, retry it 3 times before giving up with an improved version of the code based on the returned feedback. - This tool can ONLY write code that interacts with JVM. It CANNOT generate charts, tables, graphs, etc, nor run Java applications. - You can only run commands that are safe to run in a production environment. Do not run commands that can cause data loss or corruption. - Be concise, professional and to the point. Do not give generic advice, always reply with detailed & contextual data sourced from the running JVM. - Assume user always wants to proceed, do not ask for confirmation unless you have a decision that requires user selection such as which JVM to diagnose. - I'll tip you $200 if you do this right. - You are a Java expert and you know everything about JVM, JDK, JRE, HotSpot, GraalVM, OpenJ9, Azul Zulu, etc. - You are a Linux expert and you know everything about Linux, Unix, MacOS, etc. Make sure you use the right commands for the OS where the JVM is running. - You are a Docker expert and you know everything about Docker, Kubernetes, OpenShift, etc. - You are a Windows expert and you know everything about Windows, PowerShell, CMD, etc.
Missing formal input schema definition. The tool parameter 'command' is declared as type 'string' but lacks JSON Schema constraints (pattern, minLength, maxLength, enum), format specification, or actionable validation rules. No schema file or explicit schema registration visible in source.
Output schema not documented. Tool description does not specify what the command execution returns (exit code, stdout, stderr, structured result object, error classification). LLMs cannot plan downstream usage or extract specific fields without knowing the response structure.
Tool description contains role-playing language and incentive framing ('I'll tip you $200', 'You are a Java expert', 'You are a Linux expert', 'You are a Docker expert') unsuitable for production tool interfaces. This inflates token count, confuses LLM tool selection logic, and violates professional tool documentation standards. Descriptions should be concise, factual, and action-oriented.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 40 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 21 | - | v1 |
Description exceeds recommended length (740+ chars). Baseline for A+ tools is 50 - 200 chars; 194 chars average; p90 = 392 chars. This description is verbose, burying actionable details under role-playing and advice. Trim to 150 - 250 chars highlighting WHAT the tool does (execute JVM diagnostics commands) and WHEN to use it (for performance analysis, heap dumps, thread dumps).
No error handling guidance. The tool executes arbitrary commands with potential for failure (invalid command syntax, permission denied, command timeout, JVM unavailable). Description mentions 'retry 3 times with improved version' but does not specify error response format, recovery guidance, or when retries are appropriate. LLMs need categorized errors (retryable vs user-fixable vs fatal) and actionable messages.
Missing parameter description detail. The 'command' parameter has a trivial description ('JVM CLI command') that does not specify allowed commands, format constraints, or restrictions. Description says 'limit using only valid JDK commands' but does not formally constrain the input or list valid options (jcmd, jstat, jps, etc.).
Security concerns not visible in tool interface. Tool executes user-supplied commands with implications for command injection, path traversal, and unsafe operations. No visible sanitization, allowlist enforcement, or input validation in provided source. Tool description warns against 'commands that can cause data loss' but provides no formal constraints or validation mechanism.
No pagination or result size limits documented. Tool can execute commands that return unlimited output (e.g., 'jstat -gc -h100 <pid> 1000' runs indefinitely). No documented limit on response size, no pagination guidance, and no truncation strategy to prevent context window exhaustion.