Skip to main content
Glama

press

Press a key on a targeted element to simulate keyboard input during browser automation.

Instructions

Press a key on a specific element (e.g. Enter on @e3).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keysYesKey combination.
leaseNoOptional lease token to present if the target session is leased (0.7.0). Threaded per-call; never read from the server's env.
targetYes@eN ref or selector.
sessionNoOptional session name to target (omit for the shared 'default'). On a daemon shared with other agents, pass a UNIQUE name for stateful multi-step work (go→click→fill) so you don't collide on 'default'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden of disclosure. It states the core action (press a key on an element) but does not reveal potential side effects, prerequisites (e.g., element focus requirements), failure behavior, or whether it simulates a real user input. This is minimal but not misleading.

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?

The description is a single, focused sentence that includes a useful example. It is front-loaded with the action and avoids any filler, making it immediately actionable and easy to parse.

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 simple operation with well-described parameters and no output schema, the description is largely sufficient. An agent can correctly call it with target and keys. The only gaps are behavioral nuances (e.g., whether the element must be in view or interactive), but these are minor given the tool's simplicity.

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?

The schema provides 100% parameter coverage, so the baseline is 3. The description adds a small illustrative example (Enter on @e3) that improves understanding of the target and keys parameters, but it does not provide additional semantics beyond the schema's own descriptions.

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 uses a specific verb 'press' with a resource 'a specific element' and provides a concrete example (Enter on @e3). This clearly distinguishes it from sibling tools like 'type' (typing text) and 'keys' (likely global key presses), making the purpose unambiguous.

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 does not explicitly mention when to use this tool over alternatives like 'keys' or 'type'. It implies usage when you need to send a key press to a specific element, but it lacks explicit conditions, exclusions, or references to other tools, leaving the agent to infer the appropriate context.

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