Skip to main content
Glama

press_key

Destructive

Press a key or shortcut on the page or a targeted element to execute immediate actions like submit or delete.

Instructions

Press a key or a combination ("Control+A", "Shift+Enter"). With a selector, presses on that element (first match); without, on the page. Acts immediately — a shortcut or Enter can submit or delete — and returns {key, selector}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
selectorNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already indicate destructiveHint=true, but the description adds important context: it acts immediately and can submit or delete, which aligns with the destructive hint. It also clarifies the return value {key, selector} and the behavior with/without selector. No contradiction with annotations; the description reinforces and extends the safety profile.

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?

The description is three sentences, each serving a purpose: specifying input format, targeting behavior, and warning of side effects with return value. It is efficient and front-loaded with key usage. Only minor fluff: 'with a selector' phrasing could be tightened, but overall structured effectively.

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

Completeness4/5

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

Given the tool's simple parameter set (key, selector) and the presence of an output schema (which explains the return), the description covers all essential aspects: input format, targeting, immediate side effects, and return. It could add details like how to escape special characters or whether modifier keys are required, but it is sufficient for correct invocation in most cases.

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 explains that 'key' is a key or combination (e.g., 'Control+A') and 'selector' targets an element on first match, which adds meaning beyond the schema's minimal labels. However, it doesn't detail format edge cases or prerequisites (e.g., element must be visible), so it only partially compensates for low coverage.

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 the verb (press) and the resource (key or combination on element/page), making the tool's purpose clear. It distinguishes from siblings like scroll, fill_form, and goto by focusing on key press actions, though it doesn't explicitly name a sibling. The mention of selector differentiates it from other input tools.

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?

The description implies usage context: press keys for shortcuts like Control+A, Shift+Enter, and with a selector to target a specific element. It notes that it acts immediately and can submit or delete, warning of side effects. However, it doesn't explicitly state when NOT to use this tool versus alternatives like fill_form or click actions, and no siblings are named.

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