Skip to main content
Glama

java_list_windows

Read-only

List the Java windows visible to Java Access Bridge to check whether an application is detectable and to get an hwnd or title for attaching. Only Java application windows are listed.

Instructions

List the Java windows Java Access Bridge can see on this machine.

Use this to find out whether the application is visible to JAB at all, and to get a title or hwnd for java_attach_window. If the application is not in this list, nothing else will work and the problem is the attachment or the environment, not a locator -- run java_diagnostics next.

Only windows of Java applications are listed; this is not a general Windows window list.

Returns: One line per window, with hwnd, pid and title. "No Java windows are visible" is a measurement and is reported as such, not as an empty string.

Errors: is_error with an actionable message when pyjab cannot answer. On pyjab 1.9.0 the listing runs through the documented pyjab-inspect windows --json, because the function behind it is not public API yet; the message says so when even that is unavailable.

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_list_windows"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint and openWorldHint, but the description adds substantial context beyond them: the per-window return shape (hwnd, pid, title), the explicit statement that an empty result is reported as a measurement rather than an empty string, and error behavior including the pyjab 1.9.0 fallback via 'pyjab-inspect windows --json'.

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?

Front-loaded with the core purpose, then cleanly sectioned into usage, Returns, and Errors. Slightly verbose in the pyjab 1.9.0 implementation detail, but that detail is actionable for diagnosing failures rather than filler.

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 zero-parameter read-only listing tool, the definition covers purpose, selection guidance, fallback diagnostics, return format, and error semantics. Even though an output schema exists, the description's summary of the return shape is consistent and adds no confusion.

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 takes zero parameters, so there is nothing for the description to disambiguate; the baseline for a no-param tool applies. The description correctly implies no filtering or scoping arguments are needed.

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?

States a specific verb and resource ('List the Java windows Java Access Bridge can see on this machine') and explicitly scopes it against the general Windows window list. It also names the sibling java_attach_window as the consumer of its output, so an agent can distinguish it from other listing tools.

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

Usage Guidelines5/5

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

Gives explicit when-to-use ('find out whether the application is visible to JAB at all'), an exclusion ('not a general Windows window list'), and a concrete fallback path: if the app is absent, run java_diagnostics next because the problem is attachment/environment, not a locator.

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