Skip to main content
Glama

keyboard_events

Records focus, key, input, composition, resize, and scroll events with viewport dimensions on an iOS Safari page, then lets you read the captured data or stop recording.

Instructions

Record what the page sees around the keyboard: focusin/focusout, keydown/keyup, beforeinput/input, composition events and every window and visualViewport resize or scroll, each with the viewport numbers at that moment. action=start installs the recorder (a navigation removes it), read returns the events (since = how many to skip), stop removes it.

Input Schema

NameRequiredDescriptionDefault
pageNoindex in inspector_pages; default the first page with a real address
waitNoseconds to wait for the page list, default 60
clearNo
sinceNo
actionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses that recording must be installed via action=start, that a navigation destroys the recorder, and that read returns accumulated events with a skip offset. It omits permission/auth needs and any buffering limits, but the key lifecycle gotcha is stated.

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?

Two tight sentences, front-loaded with what is recorded, then the action semantics. The event-type list is long but each term adds precision rather than padding.

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?

For a 5-parameter tool with no output schema and no annotations, the description gives the shape of returned events ("with the viewport numbers at that moment") but leaves clear, page, and wait unexplained and provides no guidance on event volume or return format. Adequate but with clear gaps.

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 only 40%, and the description compensates for two parameters: action values and since ("how many to skip"). It says nothing about page, wait, or clear — clear is completely undocumented in both schema and description, leaving a notable gap for a destructive-sounding flag.

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 (record) and a concrete resource (keyboard/focus/input/composition/resize/scroll events), enumerating exactly what is captured. It is distinguishable from siblings like console_messages or network_log, though it doesn't explicitly name them.

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 explains the lifecycle of the three actions (start installs, read returns with since-skip, stop removes), which implies usage, and warns a navigation removes the recorder. However, it never says when to choose this over keyboard_state, keyboard_check, or console_messages, so the agent must infer fit.

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