Skip to main content
Glama

page_type

Destructive

Types text into the focused element or a CSS/locator field in a browser tab via CDP, with optional clearing and submit key. Ensures trusted input events and supports nested frames.

Instructions

Insert text into the focused element or a CSS/structured-locator field in a specific tab using background CDP input; xterm containers automatically retarget their helper textarea. Optionally clear and submit a key. Missing, ambiguous, or unusable targets dispatch nothing. CSS/structured matches are reduced to visible, interactable candidates so hidden templates do not win; the resulting input event is trusted in the page. The result includes active_element and focus_confirmed so omitted-selector input is auditable. Nested frame locators support same-origin, cross-origin and OOPIF targets. A call retains the selected document and element, then checks the focus chain before each input. Navigation or replacement returns stale_frame; inspect input_dispatched and do not replay partial or unknown input. A new independent call can locate the new document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
clearNo
timeoutNo
selectorNo
session_idNo
submit_keyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations declare destructiveHint=true, and the description expands on this with concrete behaviors: optional clear/submit, retargeting for xterm, reduction to visible interactable candidates, trusted input events, focus_confirmed output, stale_frame on navigation, and replay warnings. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is verbose, with several long sentences packed with edge cases and implementation details. It is front-loaded with the core action, but the subsequent sentences could be trimmed or grouped. Overly detailed for a quick scan.

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

Completeness3/5

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

Behaviorally it covers many scenarios (missing targets, stale frames, retargeting, auditable output), and an output schema exists so return values are handled. However, it fails to explain the timeout and session_id parameters, which are part of the input schema, leaving agents to guess their semantics. This gap prevents full completeness.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It indirectly covers text, clear, submit_key, and selector behavior, but timeout and session_id are not explained at all. Even for the covered parameters, details like accepted formats or defaults are omitted.

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?

States a specific verb ('Insert text') with a clear resource ('focused element or CSS/structured-locator field') and distinguishes it from siblings like page_click and page_press. The purpose is unambiguous and the technical mechanism (background CDP input) adds specificity.

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?

Provides context about when it applies (focused element, selector, xterm retargeting) and conditions like missing/ambiguous targets dispatching nothing. However, it does not explicitly name alternatives or exclusion criteria, such as 'use page_press for key-only input' or 'use execute_js for complex scripting'.

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