Skip to main content
Glama

Press Keyboard Key

gpm_browser_press

Simulates key presses or key combinations (e.g., Enter, Control+A) in a GPM anti-detect browser, optionally focusing a target element first via a selector.

Instructions

Nhấn phím hoặc tổ hợp phím (vd "Enter", "Tab", "Escape", "Control+A", "PageDown").

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

Input Schema

NameRequiredDescriptionDefault
keyYesTên phím Playwright (vd "Enter", "Control+A")
selectorNoTuỳ chọn: focus vào phần tử này trước khi nhấn phím
profile_idNoID của profile GPM đang kết nối CDP (có thể bỏ trống nếu chỉ có 1 profile đang kết nối)
timeout_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/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, yet it says nothing about what happens if the selector is missing, whether focusing occurs, whether the key press waits for readiness, or how errors surface. Only the format of the key string is conveyed, which is the minimum for a mutation-style browser interaction.

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?

A single short sentence with the core action front-loaded and illustrative examples appended. It is efficient and free of padding, though the example list is somewhat redundant with the schema's own 'Enter'/'Control+A' examples.

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?

With four parameters, no annotations, and no output schema, the definition should do more work: it never explains the optional selector-based focus flow, timeout behavior, or multi-profile disambiguation. What exists covers the action but not the operational context an agent needs to invoke it confidently.

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 description coverage is 75%, so the schema already documents key, selector, profile_id, and timeout_ms semantics. The description adds a useful hint that key accepts combinations like 'Control+A', but says nothing about the selector focus behavior or profile/timeout implications beyond what the schema states.

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 key combination) and gives concrete examples like 'Enter', 'Control+A', and 'PageDown'. It is clear what the tool does, but it does not differentiate itself from the sibling gpm_browser_type, which an agent could easily confuse with key pressing.

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 use this tool versus alternatives such as gpm_browser_type (text entry) or gpm_browser_click. The examples imply keyboard input scenarios but the description never states prerequisites, exclusions, or which tool handles related input tasks.

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