Skip to main content
Glama
mcp-browser-dev-tools

mcp-browser-dev-tools

by Hinaser

press_key

Simulates real keyboard input to press a key or shortcut on a selected or focused browser element and returns the resulting changes.

Instructions

Press a key or combination with real keyboard input on selector (focused first) or the focused element. Returns changes.

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": {
      "key": "<key>"
    },
    "name": "press_key"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesA character or key name (Enter, Tab, Escape, ArrowDown, PageUp, F5, ...); join modifiers with +, e.g. Shift+Tab, Meta+a.
selectorNoLocator: ref=e3, CSS, text=…, role=button[name="…"], name=…, or a >> b
sessionIdNo
timeoutMsNoms to retry while the element is missing (default 2000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.4

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. 'Real keyboard input' hints at trusted OS-level events rather than synthetic dispatch, which is useful, but nothing is said about whether key presses can trigger navigation or form submission, whether missing elements cause an error, or what 'Returns changes' actually contains. Side effects and failure modes are left entirely unstated.

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?

Two short sentences, front-loaded with the action and target. The trailing 'Returns changes' is vague filler, but nothing else is wasted.

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?

For a four-parameter input tool with no output schema and no annotations, the definition covers the mechanics of targeting and retry (via schema) but leaves the return value ('changes') and side-effect risk unexplained. Adequate to invoke, not adequate to predict outcomes.

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 coverage is 75%, so the schema already documents key syntax, selector formats, and timeoutMs. The description only adds the resolution priority ('selector focused first ... or the focused element'), which is real but marginal value; sessionId remains undocumented in both places.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Press a key or combination with real keyboard input') and clarifies the target resolution order (selector focused first, otherwise the focused element). It is clear what the tool does, though it never explicitly contrasts itself with the closely related 'type' or 'click' siblings.

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

Usage Guidelines2/5

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

There is no guidance on when to choose press_key over type, click, or run_steps; the only guidance is about targeting (selector vs. focused element). The agent must infer that this is for discrete key/keystroke events rather than text entry.

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