Skip to main content
Glama

keyboard_type

Simulate real keyboard input by dispatching per-character keydown/keypress/keyup events for CodeMirror, contenteditables, editors, and applications that listen to keyboard events.

Instructions

Type a literal string as real keyboard events. Unlike type (which uses fill), this dispatches per-character keydown/keypress/keyup events — works with CodeMirror, contenteditables, editors, and anything that listens to keydown. Optionally focus a selector first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
focusSelectorNoOptional selector to click (and thus focus) before typing. If omitted, types into whatever is currently focused.
delayMsNoPer-key delay, default 0.
timeoutMsNoFocus timeout. Default 5000.
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by explaining the low-level event dispatch mechanism, target compatibility, and optional focus behavior. It doesn't mention error handling, performance implications, or what happens if focusSelector fails, but provides substantial behavioral context beyond basic functionality.

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

Conciseness5/5

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

Two sentences with zero waste - first establishes purpose and differentiation from sibling, second explains optional parameter behavior. Every phrase adds value: 'literal string', 'real keyboard events', 'per-character keydown/keypress/keyup events', specific target examples, and focus behavior.

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?

For a 4-parameter tool with no annotations and no output schema, the description provides excellent context about when to use it vs alternatives and behavioral characteristics. It could be more complete by mentioning what the tool returns (success/failure indication) or error scenarios, but given the sibling context and clear differentiation, it's quite comprehensive.

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?

Schema description coverage is 75% (3 of 4 parameters have descriptions), so baseline would be 3. The description adds value by explaining the 'focusSelector' parameter's purpose ('Optionally focus a selector first') and default behavior ('If omitted, types into whatever is currently focused'), which complements the schema's technical description. However, it doesn't add meaning for 'text' or 'delayMs' parameters.

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 the action ('Type a literal string as real keyboard events') and distinguishes it from sibling 'type' by explaining the difference in implementation ('dispatches per-character keydown/keypress/keyup events' vs 'uses fill'). It also specifies the target contexts where it works best ('CodeMirror, contenteditables, editors, and anything that listens to keydown').

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?

Explicitly contrasts with sibling 'type' tool ('Unlike `type` (which uses fill)'), provides clear when-to-use guidance ('works with CodeMirror, contenteditables, editors, and anything that listens to keydown'), and mentions optional focus behavior. This gives the agent clear alternatives and context for selection.

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/mesomya/electron-driver'

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