java_get_text
Reads text from a Java UI element handle, returning a bounded slice with its length and cut status; reports changed or non-text elements instead of returning stale or misleading values.
Instructions
Read the text of an element: a label, a text field, a table cell, a document.
Use this on a handle from a snapshot or a find. The same verification applies, so a text field that has been replaced since the snapshot reports the change instead of returning whatever is there now.
Long values are cut, and the cut is reported: the reply says how much of the whole text it carries and what the whole text's length is, so a partial read is never presented as the value.
Args:
session_id: From java_attach_window.
handle: An e:... handle from a snapshot or a find.
start: Character to start at, 0-based.
length: How many characters to return.
Returns: The slice of the element's text, with its length and whether it was cut.
Errors:
is_error for an unknown handle, a handle from another session, an element
that has changed, or an element with no text at all -- which is reported as such,
because "this control has no text" and "this control is empty" are different
answers.
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_get_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| start | No | ||
| handle | Yes | ||
| length | No | ||
| session_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |