fill
Set a form field in one verified call: click it, check focus, replace content with text, read the value back. Use instead of separate click, type, and screenshot steps.
Instructions
Set a form field in ONE verified call: click it, check the focus, replace its content
with text, read the value back. Use it instead of click + type_text + screenshot for every
field of a form.
Target the field with x,y (absolute pixels) or element (an id from parse_screen/
find_elements). Steps and what each can tell you:
click, then a FOCUS CHECK before anything is typed — browsers through the page's DOM, native GTK/Qt/LibreOffice apps through the accessibility bus (AT-SPI). If the focus is not on an editable field, or is on a field whose rectangle does not contain the click (you clicked a label; the focus stayed where it was), the call FAILS with nothing typed and "focus" naming what has it. A password field is refused the same way unless allow_password=true — landing in one by accident is the case worth stopping.
the old content is replaced (select-all, then type; text="" empties the field);
the value is read back; submit=true presses Return only if nothing failed. Returns {"ok", "action", "instance", "detail", "method", "center", "focus_checked": "browser-dom"|"at-spi"|false, "focus"?: {role, name, rect}, "verified": true|false|null, "read_back": "browser-dom"|"clipboard"|"unreadable"|"skipped", "value"?, "click_effect"?: "changed"|"none", "suggest_element"?, "hit"?, "warnings"?}: focus_checked false — nobody could tell which widget had focus (canvas, game, Xlib-only app, iframe, or AT-SPI not installed: "focus_unchecked_reason"). The text was typed blind; "warnings" says so and "click_effect" reports whether the click changed any pixel near the target ("none" = probably a static label). Treat such a fill as UNCONFIRMED and screenshot. verified true — the focused field holds exactly
text(trailing newline ignored); verified false — it holds something else ("value", first 200 chars): the field reformats or limits input (dates, phone masks, maxlength); verified null — the value could not be read (native password field, canvas). Withelement, a typed detector (ScreenParser) warns when the element is a text label and names the nearest input ("suggest_element"). Also fails (isError) when the field is still empty after typing; repeating fill() is always safe (it replaces). Native read-back goes through select-all + copy (the clipboard is restored).observe/settle_ms/observe_region: see click().
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": {
"text": "<text>"
},
"name": "fill"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| text | Yes | ||
| submit | No | ||
| verify | No | ||
| element | No | ||
| observe | No | none | |
| instance | No | ||
| settle_ms | No | ||
| allow_password | No | ||
| observe_region | No |