Skip to main content
Glama

press_key

Simulate keyboard input by pressing single keys or combinations like Ctrl+S or Alt+F4 to automate desktop application interactions.

Instructions

Press a key or key combination.

Single key: "enter", "tab", "escape", "f5", "backspace".
Combination: ["ctrl", "s"], ["ctrl", "shift", "p"], ["alt", "f4"].

Args:
    keys: A single key name, or a list of keys for a combination
          (all held together, then released in reverse order).
    repeat: Number of times to press (default 1).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keysYes
repeatNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/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. It effectively discloses the combination mechanics ('all held together, then released in reverse order') and the default value for 'repeat'. However, it lacks safety/disruption disclosure (e.g., what happens if pressed in wrong window) and does not mention timing delays between repeats.

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?

Well-structured with a clear single-line purpose, concrete examples grouped logically (single vs. combination), and an Args section. The formatting is readable and every sentence adds value, though the Args section uses informal formatting ('Args:') rather than standard prose.

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

Completeness3/5

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

While the output schema exists (covering return values), the description misses critical operational context for a GUI automation tool: it does not specify which window receives the keystroke or whether focus is required, especially relevant given siblings like 'activate_window' and 'windows' exist.

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 0% (properties lack descriptions), requiring the description to compensate. The Args section successfully documents both parameters: explaining 'keys' accepts a single string or list with combination behavior, and 'repeat' accepts an integer with default 1. Examples compensate for lack of enum constraints in 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 key or key combination' and provides specific examples (e.g., 'enter', 'tab', ['ctrl', 's']) that distinguish it from the sibling tool 'type_text' (which presumably enters text strings). However, it does not explicitly contrast usage scenarios with similar input tools like 'click' or 'type_text'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives (e.g., 'type_text' for text entry vs. 'press_key' for shortcuts). No mention of prerequisites like window focus requirements, which is critical given the presence of siblings like 'activate_window' and 'focus'.

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

Install Server

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/Touchpoint-Labs/Touchpoint'

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