Skip to main content
Glama

key

Presses keyboard shortcuts and keystrokes in Firefox, such as Enter or Ctrl+A, optionally targeting a specific tab. Use it to simulate user typing and shortcut actions.

Instructions

Press keys, space-separated, e.g. "Enter", "ctrl+a Backspace", "shift+Tab".

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

Input Schema

NameRequiredDescriptionDefault
keysYes
tabIdNoTab to act on. Omit for the active tab.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden and discloses very little. It does not say where key events are delivered (active element? page body?), whether focus is required, how long it takes for key events to take effect, whether individual keys are typed sequentially, or what happens if the tab is not found, all of which matter for an automation input tool.

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?

A single front-loaded sentence with the format rule first and examples second; nothing is redundant. Given the tool's simplicity, the length is appropriate.

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 two-parameter input tool with no output schema and no annotations, the definition covers the key-format question but leaves the surrounding mechanics, such as focus, target element, and failure behavior, unstated. It is adequate to invoke the tool but not to predict its effects.

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 only 50% and the keys parameter has no schema description, so the description's explanation that keys are space-separated (with combination examples like "ctrl+a Backspace") adds real meaning beyond the schema. tabId is already documented in the schema, so nothing is lost there.

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 keys") and immediately demonstrates key syntax with three concrete examples ("Enter", "ctrl+a Backspace", "shift+Tab"), so an agent knows this sends keyboard input rather than text. It stops short of differentiating itself from siblings like type or form_input, which an agent would have to infer.

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?

No explicit when-to-use or when-not-to-use guidance is given; the examples imply that this tool is for discrete key presses and shortcuts. The agent must guess that ordinary text entry belongs to a different tool, and nothing states whether the page must be focused first.

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