Skip to main content
Glama

Press key

browser_press_key

Presses keys like Enter, Escape, or Control+A in an automated browser session to trigger shortcuts and confirm actions. Use it to submit forms, dismiss dialogs, or send key combos during browser automation.

Instructions

按键(Enter / Escape / Control+A 这类写法)。默认 ego 引擎。

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": "browser_press_key"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYes
engineNo浏览器引擎:ego(默认,真实浏览器 + 登录态)/ edge(Playwright/Edge,需另装 playwright)ego

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden. It states that the ego engine is the default, but says nothing about whether a page/session or element focus must exist first, whether the key is dispatched to the page or an element, or what happens on failure.

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 clauses, front-loaded with the action and its notation format. Nothing is wasted, though the brevity comes at the cost of the missing behavioral detail noted elsewhere.

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

Completeness2/5

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

For a two-parameter browser interaction tool with no annotations and no output schema, the definition is thin: it omits session/focus preconditions, error behavior, and differentiation from the similarly named sibling. Only the key syntax and default engine are covered.

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 50%: the 'engine' parameter is documented in-schema (including the ego vs edge trade-off), but 'key' has no schema description. The description partially compensates by showing valid key-notation forms, though it does not cover modifier combinations, special keys, or edge-engine prerequisites.

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 gives a specific verb plus resource ('按键' / press a key) and clarifies the accepted key-notation syntax with examples like Enter, Escape, Control+A. It does not, however, distinguish this tool from the sibling 'press_key', which by name appears to do the same thing.

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 statement of when to use this tool versus alternatives, and no mention of the apparently overlapping 'press_key' sibling. The only contextual hint is the default engine, which is invocation detail rather than usage guidance.

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