Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
textYesText to type into the field
clientYesAllowlisted 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_idNoOptional. 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_finalNoWhen true, the visual session clears immediately after this tool resolves. Optional (default false).
selectorYesCSS selector or element ref for the input field (e.g., "#email", "input[name=search]", or "e12" from get_dom_snapshot)
clear_firstNoReplace 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_reasonYesShort human-readable reason shown in the overlay (for example, "Logging in to GitHub"). Required.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses default replace-vs-append semantics per field type, the Google Docs cursor-insertion default, tab ownership rules with an explicit TAB_NOT_OWNED rejection, a configurable tab cap (1-64, default 8), and the shape/truncation behavior of the change_report. It does not cover permission/auth requirements beyond the client allowlist, or whether real keyboard/input events are synthesized — a real gap for a typing tool.

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 purpose and the highest-risk behavioral nuance (clear_first/Docs), then supporting detail. Slightly repetitive — clear_first is explained in both the prose and the schema, and the change_report paragraph is long — but every block carries actionable information.

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?

No output schema exists, and the description compensates by describing what comes back (rendered text plus change_report with its fields and truncation flag). Combined with the multi-agent tab rules and the related-tool list, it is nearly complete for a 7-parameter tool; only permissions/event-firing questions remain open.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The prose largely restates clear_first behavior already documented in the schema, adding only the Docs-vs-normal-field framing; no additional syntax or format detail for selector, client, or tab_id beyond what the schema states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a concrete verb+resource+mechanism: 'Type text into an editable field by selector'. It is clear what the tool does and names related tools. However, it never distinguishes itself from the sibling 'insert_text', which sounds like it addresses the same job, so sibling differentiation is incomplete.

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

Usage Guidelines3/5

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

It explains the operational distinction between normal fields (replace by default) and Google Docs (insert at cursor, set clear_first=true to replace), which implies when each mode applies. But it gives no explicit when-to-use/when-not-to-use guidance relative to alternatives like insert_text, click + press_key, or clear_input — those appear only as a bare 'Related:' list with no conditions attached.

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