Skip to main content
Glama

Type text

type_text

Inserts literal text into a browser input using genuine input events and appends to any existing value; clear the field first to replace its contents.

Instructions

Type text into an input via the browser's own text insertion.

Focuses the element with a real click first (programmatic focus when something decorative covers it), then inserts the text through CDP, so the page receives genuine input events and no page JavaScript runs. Appends to any existing value: call clear_input first to replace it. Use press_key or human_type when a page needs per-key events. Returns the target, its tag, and a summary with the character count.

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>",
      "selector": "<selector>"
    },
    "name": "type_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
tabNoTab id from list_tabs or new_tab to act on, instead of the active tab. The active tab does not change. Omit to use the active tab. Example: 'tab_2'
textYesLiteral text to insert. Inserted as one chunk, so it fires no per-key events. Example: 'user@example.com'
selectorYesCSS selector, or a numeric id from get_interaction_tree passed as a string. Example: '#submit' or '42'

Output Schema

NameRequiredDescriptionDefault
idNoInteraction-tree id of the element acted on; reusable while it exists.
tagNoTag name of the element acted on.
targetYesThe selector, id or text the call acted on.
summaryYesOne line saying what happened.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.4/5.0
Behavior4/5

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

Beyond the annotations, the description discloses the focus mechanism (real click first, programmatic fallback when something decorative covers it), the CDP insertion path, that no page JavaScript runs, and that the operation appends rather than replaces. This explains why idempotentHint is false and gives the agent a concrete remediation path. It stops short of noting failure modes (element missing, not editable) or timing/wait behavior.

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 core action, then mechanism, then constraints, then return value — good ordering with no filler sentences. The parenthetical about decorative overlays is the only slightly dense aside, but it earns its place by explaining the focus fallback.

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

Completeness5/5

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

The tool has an output schema, and the description still gives a one-line return summary (target, tag, character count) without over-explaining. With 100% parameter coverage and annotations covering the safety profile, everything an agent needs to call this correctly is present.

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 tab, text, and selector are already fully documented, including the numeric-id-as-string selector form and the one-chunk insertion note. The description's only added semantic is that text appends to any existing value, which is useful but largely restates what the schema's chunk-insertion note implies. Baseline 3 applies when the schema carries the parameter burden.

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?

The opening clause gives a specific verb and resource ('Type text into an input via the browser's own text insertion') and the mechanism clause ('genuine input events and no page JavaScript runs') separates it from script-based approaches. Later sentences name the sibling tools press_key and human_type, so an agent can route between them without opening schemas.

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

Usage Guidelines5/5

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

Explicit when-to-use and when-not-to-use guidance is present: append-by-default with a direct instruction to call clear_input first to replace, plus 'Use press_key or human_type when a page needs per-key events.' Both the exclusion condition and the alternative are stated rather than inferred.

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