Skip to main content
Glama

key

Simulate keyboard input on a focused browser element or tab, including individual presses and chords such as Enter, Escape, Tab, and Ctrl+A.

Instructions

Press a key or chord on the focused element, e.g. "Enter", "Escape", "Tab", "ArrowDown", "Backspace", "ctrl+a".

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

Input Schema

NameRequiredDescriptionDefault
keyYes
refNoElement reference from read_page or find, e.g. "e12"
tabIdYesTab ID, from tabs_list or tab_create

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.8

TDQS

B3/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 disclosure burden, and it says only that a press happens on the focused element. It doesn't say whether the press targets the `ref` element when supplied, whether key events are dispatched as real browser events, what happens on an invalid ref, or what the call returns.

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 front-loaded sentence with a compact, useful example list and no filler. The examples are justified because they define the accepted key-name format, though they could be labeled as formatting explicitly.

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 browser-automation tool with no annotations and no output schema, the definition omits prerequisites (focus, obtaining a `ref`), failure modes, and result behavior. Combined with the lack of sibling routing, an agent could plausibly call it correctly only by guessing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 67%, so `key` itself has no schema description; the examples and the chord syntax ("ctrl+a") in the description directly compensate for that gap. The `ref` and `tabId` parameters are documented in the schema, and the description adds nothing further about them.

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?

"Press a key or chord on the focused element" states a specific verb and resource, and the example list ("Enter", "Escape", "ArrowDown", "ctrl+a") makes the input concept concrete. It stops short of distinguishing this from sibling `type` or `form_input`, so an agent must infer which one to use from context.

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 explicit guidance on when to use this versus `type`, `form_input`, or `click`. It also doesn't state that an element typically needs to be focused first, or that `read_page`/`find` must be called beforehand to obtain a `ref`.

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