Skip to main content
Glama

java_select

Destructive

Select an option in a Java combo box, list, or tab set, or select a table row or cell by handle; accessibility-based selection works when direct cell clicks do not.

Instructions

Select an option in a combo box, list or tab set — or a row or cell in a table.

Two shapes, and which one you want is told by the arguments:

  • option="Tennis" selects by the text the application shows, for a combo box, a list or a tab.

  • row=2 selects a whole table row, and row=2, column=1 selects one cell. Table selection goes through the table's own accessible selection, which is the path the application responds to — pyjab's docs are explicit that the cells get_cell() returns often report bounds = -1 and cannot be clicked.

The element is verified before anything is selected, exactly as java_click describes.

Args: session_id: From java_attach_window. handle: The combo box, list, tab set or table. option: Text to select. Ignored when a row is given. row: Row index to select, 0-based. column: Column index, for one cell rather than the whole row. simulate: Use simulated input where the action supports it.

Returns: What was selected, and how.

Errors: is_error for an unknown handle, an element that changed, an option the control does not have, or neither an option nor a row given.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "session_id": "<session_id>",
      "handle": "<handle>"
    },
    "name": "java_select"
  }
}

Input Schema

NameRequiredDescriptionDefault
rowNo
columnNo
handleYes
optionNo
simulateNo
session_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Adds real behavior beyond the annotations: the element is verified before anything is selected, table selection is performed through the table's own accessible selection path rather than clicking cells (with the reason: get_cell() bounds often report -1), and error conditions are enumerated. It does not spell out consequences of state-changing selections (e.g., selecting a tab or row may trigger application updates), which matters given destructiveHint=true.

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?

Purpose is front-loaded, followed by the argument-shape split, then Args/Returns/Errors sections. Slight redundancy between the shape bullets and the Args list, and the pyjab documentation remark is more justification than instruction, but nothing is off-topic.

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

Completeness4/5

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

For a six-parameter interaction tool with an output schema, it covers purpose, every parameter, return summary, and error cases, so an agent can invoke it confidently. The remaining gap is side-effect disclosure: with destructiveHint=true, it should say what changes in the application when a tab or row is selected.

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 coverage is 0%, so the description carries the full burden and does: session_id sourced from java_attach_window, handle identified as the target element, row documented as 0-based, column limited to single-cell selection, and the option/row precedence rule stated. Only 'simulate: use simulated input where the action supports it' is left vague.

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 (select) and enumerates the exact resources it operates on: combo box, list, tab set, table row, table cell. The two-shape framing (by option text vs. by row/column index) lets an agent distinguish this from java_click or java_set_text without opening a schema.

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?

Clearly states which argument shape selects which kind of target and notes 'option ... Ignored when a row is given', which prevents a common misuse. It also points at java_click for the shared element-verification behavior. It stops short of explicit when-not guidance against siblings such as java_click or java_set_text.

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