Skip to main content
Glama

browser_press_key

Sends keystrokes such as Enter, Escape, Tab, or ArrowDown to the currently focused element on a web page, enabling AI agents to submit forms, confirm dialogs, navigate fields, and control page interaction.

Instructions

向当前焦点元素发送按键,如 Enter / Tab / ArrowDown

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键名,如 Enter、Escape、Control+A

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.2/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 behavioral burden. It discloses only the focus-targeting behavior; it does not say whether this triggers real keydown/keyup events, whether it waits for effects, whether it scrolls the element into view, or what happens when no element is focused — significant gaps for an input-injecting tool with zero annotation coverage.

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?

One short, front-loaded clause with no filler; the action and target appear immediately. Brevity is appropriate, though the single sentence leaves little room for the behavioral detail this tool needs.

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 one-parameter tool with full schema coverage and no output schema, the description covers the minimum. It remains thin on the mechanics of key injection and focus requirements, which an agent would need to invoke it confidently in edge cases.

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 100% with a single required 'key' parameter, so the baseline is 3. The description's examples (Enter / Tab / ArrowDown) largely repeat the schema's own examples rather than adding new meaning such as modifier-combination syntax beyond the schema's 'Control+A' hint.

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 target: send a key to the currently focused element, with concrete examples (Enter / Tab / ArrowDown). An agent can distinguish this from browser_type (text input) or browser_click, though the differentiation is implied rather than stated.

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 phrase '向当前焦点元素' implies the prerequisite that an element must already hold focus, which is useful context, but there is no explicit when-to-use vs. when-to-use-browser_type guidance and no mention of what to do if nothing is focused.

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