Skip to main content
Glama

Wait for Device Event

terminal_wait_device_event
Read-only

Waits for a device appearance or disappearance event after a known cursor so agents can detect serial device changes and proceed with connection decisions.

Instructions

Wait for a device appearance or disappearance event after a known cursor; use terminal_read_device_events without cursor for an immediate snapshot. After appeared, call terminal_get_connection_decision before terminal_open_serial.

Input Schema

NameRequiredDescriptionDefault
cursorYesOptional next device event cursor; when set, wait for newer events.
max_eventsNoMaximum number of device events to return.
timeout_msNoOptional wait timeout in milliseconds when cursor is supplied; maximum 86400000.

Output Schema

NameRequiredDescriptionDefault
nextYes
eventsYes
droppedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered; the description adds the important behavioral fact that this is a blocking wait whose result must be followed by a decision call before opening a port. It stops short of describing timeout/pagination edge behavior, but the sequencing context is genuinely additive.

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, no filler: the operation, the contrastive alternative, and the required follow-up chain. The core purpose is front-loaded in the first clause.

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

Completeness5/5

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

An output schema exists so return values need not be explained, parameters are fully documented in the schema, and the description supplies the cross-tool workflow that structured fields cannot express. Nothing needed to invoke it correctly is missing.

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 description coverage is 100% and each parameter is documented there, so the schema does the heavy lifting. The description reinforces cursor resumption semantics ('after a known cursor') but adds no format, bound, or interaction details beyond what the schema already states.

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?

States a specific verb (wait) and resource (device appearance/disappearance event) plus the scope qualifier 'after a known cursor.' It is immediately distinguishable from terminal_read_device_events, which the description itself names as the contrasting sibling.

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

Usage Guidelines5/5

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

Explicitly says to use terminal_read_device_events without cursor for an immediate snapshot, defining exactly when this tool is and isn't the right choice. It also gives forward workflow guidance: call terminal_get_connection_decision after an appearance, before terminal_open_serial.

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