Skip to main content
Glama

press_key

Press a key or key combination to submit, dismiss, navigate, or trigger shortcuts. Use for discrete keyboard actions, not for entering text.

Instructions

Press a single key, optionally with modifiers, to submit, dismiss, navigate or trigger a shortcut. Not for entering text: use fill_by_uid instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesOne key, optionally preceded by "+"-separated modifiers, such as "Escape", "Enter" or "ctrl+shift+t". Modifiers: ctrl, alt, shift, meta. Named keys: Enter, Return, NumpadEnter, Tab, Backspace, Delete, Insert, Space, Escape, Home, End, PageUp, PageDown, ArrowUp, ArrowDown, ArrowLeft, ArrowRight, F1-F12, Numpad0-Numpad9, Clear, Pause, Help, Cancel, Semicolon, Equals, Add, Subtract, Multiply, Divide, Decimal, Separator. Anything else must be a single character. Any number of modifiers, but only one key.
uidNoFocusable element UID from snapshot to focus before pressing (default: the already focused element)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.10.3

TDQS

A3.8/5.0
Behavior3/5

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

Annotations only include readOnlyHint=false, leaving the description to carry behavioral context. It conveys that pressing a key can submit, dismiss, navigate, or trigger shortcuts, which is useful, but it does not mention side effects, focus behavior beyond the uid parameter, or what happens when a shortcut triggers navigation.

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?

Two sentences, with the core action and purpose front-loaded and the exclusion clearly stated. Every word earns its place with no redundancy.

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?

For a two-parameter tool with full schema coverage, the description provides enough context: purpose, exclusions, and supported actions. The main gap is the ambiguous text-entry alternative given the existence of type_text, but this is a minor issue.

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 coverage is 100%, so the input schema already fully documents the key format, modifiers, named keys, and uid parameter. The description only restates the notion of modifiers and single-key input without adding meaning beyond the schema.

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 clearly states the tool presses a single key, optionally with modifiers, and names the intended effects (submit, dismiss, navigate, trigger shortcut). It explicitly distinguishes itself from text entry via fill_by_uid, though it omits the type_text sibling, which weakens full differentiation.

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?

It gives concrete use cases and an explicit exclusion: 'Not for entering text: use fill_by_uid instead.' However, since type_text is also a sibling, the alternative guidance is incomplete and could misdirect an agent to fill_by_uid for general text entry.

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