Skip to main content
Glama

java_diagnostics

Read-only

Reports read-only diagnostics on whether this machine can drive a Java application, checking JVM, pyjab APIs, Java Access Bridge status, and bridge thread state; use first when Java automation fails.

Instructions

Report whether this machine can drive a Java application right now.

Use this first when anything fails, and after installing a JVM or enabling Java Access Bridge. It reports the platform, the interpreter, the installed pyjab and which of its public APIs are present, whether Java Access Bridge is enabled, where the bridge DLL is, and the state of the bridge thread.

It is read-only and never writes to the environment: it does not enable Java Access Bridge, because a diagnostics tool that changes what it is reporting on is worse than none.

Args: load_bridge: When true, also start the bridge thread first and report whether it came up. This is the end-to-end check; it is off by default so that a mere report cannot load a DLL.

Returns: A multi-line report. A line that could not be measured says UNAVAILABLE (reason) and is never reported as zero or as "missing" -- "nothing is there" and "I could not read" are different answers.

Errors: None for the environment itself: an unusable environment is what this tool reports, so it does not fail because of one.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "java_diagnostics"
  }
}

Input Schema

NameRequiredDescriptionDefault
load_bridgeNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds substantial context beyond them: it does not enable Java Access Bridge, it never writes to the environment, load_bridge is off by default so a report alone cannot load a DLL, and an unusable environment surfaces as a report rather than an error. The explicit statement that unmeasurable lines read "UNAVAILABLE (reason)" rather than zero is meaningful behavioral disclosure the agent could not infer elsewhere.

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

Conciseness4/5

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

Well-structured with a front-loaded summary followed by Args/Returns/Errors, so an agent can stop reading early. The Returns section partly restates what the output schema covers, and the aside about a diagnostics tool that changes what it reports is editorial, though it does encode a real constraint.

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

Completeness5/5

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

For a single-optional-parameter read-only diagnostics tool with an output schema, nothing an agent needs is missing: what it inspects, when to run it, what the default does, how failures are expressed in the output, and that environment problems never raise errors. The UNAVAILABLE-vs-zero distinction is the kind of nuance that prevents misreading results.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must carry the semantics, and it does: load_bridge is described as starting the bridge thread first and reporting whether it came up, framed as "the end-to-end check," with the rationale for its false default. That is more than the bare {type: boolean, default: false} in the schema and directly informs when to flip it.

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

Purpose5/5

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

Opens with a specific verb+resource: "Report whether this machine can drive a Java application right now." The following sentence enumerates exactly what the report contains (platform, interpreter, pyjab APIs, JAB enablement, DLL location, bridge thread state), which cleanly separates it from all the java_* action siblings that perform UI operations.

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

Usage Guidelines4/5

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

Gives explicit trigger conditions: "Use this first when anything fails, and after installing a JVM or enabling Java Access Bridge." That is clear when-to-use guidance and implicitly positions it ahead of the sibling automation tools. It stops short of a named when-not or an explicit alternative to use instead of this one, so it is strong but not a full 5.

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