Skip to main content
Glama

ui_press

Press keyboard keys like Enter, Tab, or Escape to submit forms, navigate lists, or dismiss dialogs when clicking isn't supported. Optionally focus an element first.

Instructions

Press a key — Enter to submit, Tab to move on, Escape to dismiss, arrows to move through a list or grid. Optionally focuses an element first. This is the tool for keyboard-driven screens, where clicking the control is not how the application expects to be used.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesKey name: Enter, Tab, Escape, Backspace, Delete, ArrowUp, ArrowDown, ArrowLeft, ArrowRight, Home, End, PageUp, PageDown, Space.
nthNoWhich match to use when several qualify, 0-based.
roleNoNarrow the matches to this ARIA role.
textNoVisible text on the control. Matches the innermost element that carries it, and follows a <label> to its input. Optional: focuses this element first.
exactNoRequire the whole text to match rather than a substring.
frameNo'main' (default) or a substring of a frame's origin/name. Single-page apps often render the screen you want in a child frame.main
timesNoPress it this many times.
testidNoValue of a test attribute (data-testid and friends — see the testAttributes setting). Optional: focuses this element first.
selectorNoCSS selector. Descends into open shadow roots. Optional: focuses this element first.
modifiersNoHeld while pressing: shift, ctrl, alt, meta.
timeout_msNoHow long to wait for the element to become actionable before giving up.
Install Server

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations, the description carries the burden of behavioral disclosure. It does disclose key effects like submitting, dismissing, and navigating, and notes that an element can be focused first. However, it does not mention waiting behavior, repeated presses, modifier handling, or what happens after a key triggers navigation or a mutation, leaving some behavioral uncertainty.

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?

Three short sentences carry the core purpose, examples, optional-focus behavior, and usage context. There is no repetition of schema documentation and no filler; the most important information is front-loaded.

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?

The tool has 11 parameters and no annotations or output schema, so the description needs to provide enough decision context. It does this well by explaining when keyboard interaction is expected and what pressing keys accomplishes. The schema documents all parameter semantics, so the main remaining gap is lack of detail about post-press behavior and return values, which is minor given the tool's nature.

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 100%, so the baseline is 3. The description adds semantic value beyond the schema by explaining common key meanings (Enter submits, Tab moves on, Escape dismisses, arrows navigate lists/grids) and by clarifying that focusing an element is optional, which maps to the selector/text/testid parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource ('Press a key') and then gives concrete examples of supported keys and their typical effects (submit, dismiss, move through a list). It also differentiates this tool from pointer-based siblings by calling it 'the tool for keyboard-driven screens, where clicking the control is not how the application expects to be used.'

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?

The description clearly states when to use the tool: for keyboard-driven screens rather than clicking a control. It implicitly tells the agent to prefer ui_click for clickable controls, but it does not explicitly compare against related keyboard/input tools such as ui_type or ui_fill.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Dayananda-D/Devcdp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server