Skip to main content
Glama

Tap a key

press_key

Simulates keyboard key presses in the FiveM game window using GTA scan codes, with an optional hold duration, to automate in-game controls.

Instructions

Press and release a key (scan codes — what GTA's DirectInput/raw input reads). Key name: W A S D E F Q space enter esc tab shift ctrl alt arrows up down left right, f1-f12, letters/digits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
holdMsNoHold duration (default 20)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare non-readOnly, non-destructive, non-idempotent behavior. The description adds genuine context by explaining these are scan codes read by DirectInput/raw input, which justifies why it targets games, but it says nothing about timing, default hold behavior, or focus requirements.

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?

Front-loads the action, then the technical rationale, then the accepted values. Slightly list-heavy but every element earns its place; no filler.

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 input tool with no output schema, the description covers what it does, why scan codes matter, and valid inputs. It omits focus/window prerequisites and the holdMs default, though the latter is in the schema.

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 only 50%, and the undocumented 'key' parameter is the required one; the description compensates by enumerating accepted key names (letters, digits, f1-f12, named keys). holdMs is covered by the schema, so the remaining gap is minor.

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?

States a specific verb+resource ('press and release a key') and the 'press and release' framing implicitly distinguishes it from the sibling tools hold_key and release_key. It stops short of naming those siblings explicitly, so differentiation requires inference.

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?

Usage is only implied: the tap semantics contrast with hold_key/release_key, but the description never states when to choose this over them or any prerequisites. The key-name list helps invocation but not tool selection.

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