Skip to main content
Glama

press_key

Send keyboard keys such as Enter, Tab, Escape, or Ctrl+A to the focused element in a browser tab, then report navigation or page changes. Use after clicking or typing to trigger shortcuts and form actions.

Instructions

Press keys in a tab, e.g. "Enter", "Tab", "Escape" or "ctrl+a". Separate several with spaces.

The keys go to the focused element, so click or type first. Reports a navigation, or what changed on the page, like click. Paste shortcuts are refused, to keep the user's clipboard out of the page.

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

Input Schema

NameRequiredDescriptionDefault
keysYes
tab_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.6.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that input is routed to the focused element, that results report a navigation or page change (comparable to `click`), and that paste shortcuts are refused to protect the clipboard. Missing are details like whether it blocks until the resulting navigation settles or what the response shape actually looks like.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with purpose and examples, then the focus precondition, then the behavioral caveat. No filler, no repetition of the title.

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 simple two-parameter tool with no output schema, the core interaction and the clipboard restriction are covered, but the description never explains what `tab_id` selects or defaults to when omitted, and the return value is only loosely described as 'what changed on the page'.

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 0%, so the description must compensate. It does so for `keys` with format guidance (chord with '+', multiple keys separated by spaces) and examples, which is genuinely valuable, but `tab_id` is never mentioned, leaving one of two parameters completely undefined.

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 the specific action (press keys) with concrete examples ("Enter", "Tab", "Escape", "ctrl+a") that clearly separate it from the sibling `type` tool, which handles text entry. An agent can tell immediately what this does without opening the schema.

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

Usage Guidelines4/5

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

Gives a clear prerequisite: the keys go to the focused element, so click or type first. It also implies when it applies (keyboard interaction after focus) but never explicitly contrasts with `type` or `select`, leaving the agent to infer the boundary.

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