Skip to main content
Glama

type

Enter text into web input fields using element ref or CSS selector. Clear existing text before typing when specified.

Instructions

Type text into an input field identified by ref or CSS selector. For multiple fields in the same form, prefer fill_form — it handles text inputs, , checkbox, and radio in one round-trip and is more reliable than N separate type calls. For special keys (Enter, Escape, Tab, arrows) or shortcuts (Ctrl+K), use press_key instead. On stale-ref errors, call view_page for fresh refs and retry. Avoid evaluate(element.value = ...) as default data-entry recovery — it bypasses framework listeners (React, Vue) and masks real failures. (Legitimate exception: tests explicitly targeting synthetic event plumbing.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoElement reference from view_page (e.g. 'e12') — preferred over selector
selectorNoCSS selector as fallback (e.g. 'input[name=email]')
textYesText to type into the element
clearNoClear existing field content before typing (default: false)
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool types text, can clear fields, uses ref or selector, and handles stale-ref errors. It warns about bypassing framework listeners if using evaluate, which is a behavioral trait. However, it does not mention any permissions, rate limits, or confirm whether the action is destructive (though typing is generally non-destructive).

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?

The description is packed with information but remains efficient at 4 sentences. It is front-loaded with the core purpose, then expands with usage guidelines and error recovery. While slightly long, every sentence earns its place, making it useful without being overly verbose.

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?

Given the tool's moderate complexity (4 params, none nested, no output schema), the description covers the main aspects: behavior, parameter usage, alternatives, and error handling. It lacks explicit mention of return values, but that is somewhat inferable. The guidance on stale-ref and evaluate are valuable additions that enhance completeness.

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

Parameters4/5

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

Since schema coverage is 100%, baseline is 3. The description adds value by explaining the relationship between ref and selector ('preferred over selector') and the clear parameter's purpose. It clarifies that ref is from view_page and selector is a CSS fallback, which goes beyond the schema's minimal descriptions.

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 description clearly states what the tool does: 'Type text into an input field identified by ref or CSS selector.' It distinguishes from siblings like fill_form and press_key by specifying when to prefer them, making the purpose and differentiation explicit.

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?

The description provides explicit guidance on when to use this tool versus alternatives: 'For multiple fields in the same form, prefer fill_form' and 'For special keys... use press_key instead.' It also includes error recovery instructions for stale-ref errors and warns against using evaluate as a default, covering when-not-to-use scenarios comprehensively.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Silbercue/public-browser'

If you have feedback or need assistance with the MCP directory API, please join our Discord server