Skip to main content
Glama

browser_keypress

Simulate keyboard input in an open browser tab by dispatching key events to the active element or a selector, with modifiers and optional text insertion.

Instructions

Dispatch a synthetic keyboard event. Use modifiers like {"ctrl": True, "shift": True}. Pass text to also insert characters into editable targets.

Args: key: Key name, e.g. "Enter", "Tab", "Escape", "ArrowDown", "a". selector: Optional element to target. Defaults to document.activeElement. modifiers: {"ctrl"|"shift"|"alt"|"meta": True}. text: If set, also insert this text into editable targets.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
textNo
tab_idNo
selectorNo
modifiersNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It notes that a synthetic event is dispatched and that text can both key and insert characters, but omits whether events are trusted, whether they respect focus, and any caveats about targets.

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?

Compact and front-loaded with the core action, followed by per-parameter notes. The one missing element is the undocumented tab_id parameter, but the prose itself has no filler.

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?

With no annotations and no output schema, the description should disclose return/effect behavior and error conditions. It covers the four main parameters well but leaves tab_id unexplained and says nothing about how the tool reports success or failure.

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 coverage is 0%, yet for key, selector, modifiers, and text the description provides names, meanings, examples, and default behavior (selector defaults to document.activeElement). It does not document the tab_id parameter, a minor gap in a 5-param tool with a required key.

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 and resource: 'Dispatch a synthetic keyboard event.' This is precise and distinguishable from siblings like browser_type and browser_fill, which imply text entry rather than raw key dispatch.

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?

The description implies usage through detail (modifiers, text-insertion) but never states when to use this versus alternatives such as browser_type, browser_click, or browser_fill. No when-not guidance or alternatives named.

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

Deploy Server

Other Tools