Skip to main content
Glama

press_key

Destructive

Simulates pressing a keyboard key on a webpage to trigger navigation, form submission, or shortcuts, with confirmation required for actions like sending messages.

Instructions

Press a key on the page, e.g. "Enter", "Escape", "Tab", "Control+A".

Enter in a message box usually sends it, so that needs confirmed=true after the user approved it.

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

Input Schema

NameRequiredDescriptionDefault
keyYes
confirmedNo
session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and openWorldHint=true, so the safety bar is lower. The description still adds meaningful context the annotations cannot express: that pressing Enter can send/commit a message and that this requires prior user approval expressed as confirmed=true, which is exactly the consequence an agent needs to know before invoking a destructive action.

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?

Two short sentences, front-loaded with the action and examples, then the caveat. No filler, though the embedded escaped quotes make it read slightly awkwardly and the approval rule could be tightened into a single clause.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a three-parameter destructive input tool with no output schema and zero schema descriptions, the definition covers the essentials: what it does, what the key strings look like, and the one consequential side effect (Enter submitting a message) with the approval gate attached. Nothing critical to calling it safely is missing.

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 description coverage is 0%, so the description must carry the load; it does for two of three parameters by illustrating the key string format (including the "Control+A" modifier syntax) and by explaining the condition under which confirmed must be set true. Only session_id goes unexplained, which is largely self-evident from sibling tools.

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?

States a specific verb and resource ("Press a key on the page") and immediately grounds it with concrete key examples ("Enter", "Escape", "Tab", "Control+A"), which distinguishes it in practice from the sibling type_text. It stops short of explicitly contrasting itself with type_text or click, so an agent must infer the boundary from the examples alone.

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?

Provides one concrete conditional rule: Enter in a message box usually sends it, so confirmed=true is required after user approval. That is real when-to-use guidance but is limited to a single scenario; there is no general statement of when to reach for press_key over type_text or click, and no note on what to do for non-destructive keys.

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