type_text
Enter text into editable fields by selector, replacing existing content by default; append or insert at cursor when configured.
Instructions
Type text into an editable field by selector. Normal fields replace existing text by default; set clear_first to false to append. Google Docs inserts at the cursor by default; explicitly set clear_first to true to replace the document. Returns the rendered text after insertion. Related: clear_input, press_enter, get_dom_snapshot. Multi-agent: agent-scoped tabs; cross-agent reject with TAB_NOT_OWNED; cap configurable (default 8, 1-64). RETURNS change_report: when this tool runs, the response includes a change_report field with a compact diff of what the action mutated (URL, dialogs_opened, nodes_added, nodes_removed, attrs_changed, inputs_changed, focus_shift). Use this to learn the consequence without calling read_page next. If the report exceeds the size cap, change_report.truncated:true and change_report_hint are set; call read_page for the full state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text to type into the field | |
| client | Yes | Allowlisted client label. Validated against the shared v0.9.36 server/extension allowlist (see mcp/src/tools/visual-session.ts -- MCP_VISUAL_CLIENT_LABELS). Required. | |
| tab_id | No | Optional. Tab id this action targets. Omit when the calling agent owns exactly one tab; pass to disambiguate when the agent owns multiple. Single-tab agents and legacy popup/sidepanel/autopilot do not need to pass this. | |
| is_final | No | When true, the visual session clears immediately after this tool resolves. Optional (default false). | |
| selector | Yes | CSS selector or element ref for the input field (e.g., "#email", "input[name=search]", or "e12" from get_dom_snapshot) | |
| clear_first | No | Replace existing text (default true for normal fields, false for Google Docs document editing). False appends to normal fields or inserts at the Docs cursor. | |
| visual_reason | Yes | Short human-readable reason shown in the overlay (for example, "Logging in to GitHub"). Required. |