Skip to main content
Glama

Send Input Event

send_input_event
Destructive

Injects button, key, or gesture input events into a Meshtastic device UI to simulate physical presses for testing and automation.

Instructions

Inject an InputBroker event (button / key / gesture) into the device UI.

Drives the same code path as a physical button press.

Returns {ok, event_code, kb_char}.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "event_code": "<event_code>"
    },
    "name": "send_input_event"
  }
}

Input Schema

NameRequiredDescriptionDefault
portNoSerial port or `tcp://host[:port]`; omit to auto-select the one likely Meshtastic device.
kb_charNoA character code (0..255) to type with the event.
touch_xNoTouch x coordinate (0..65535), for a tap such as `USER_PRESS`.
touch_yNoTouch y coordinate (0..65535).
event_codeYesA numeric event code (0..255) or a name like `"RIGHT"`, `"SELECT"`, `"FN_F1"`. Common codes: SELECT=10, UP=17, DOWN=18, LEFT=19, RIGHT=20, CANCEL=24, BACK=27, FN_F1..F5=241..245.

Output Schema

NameRequiredDescriptionDefault
okYes
kb_charYes
event_codeYesthe numeric code a name resolved to

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and idempotentHint=false, so the risk profile is carried structurally. The description adds real value by explaining that the injection follows the same code path as a physical press, implying genuine UI side effects on the device, but it says nothing about connection prerequisites, what state could be disturbed, or whether the device must be actively driven.

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?

Three short lines, front-loaded with the core action and with zero filler. The final line restating the return shape is somewhat redundant given that an output schema exists, but it costs little.

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?

The output schema and annotations cover return values and the safety profile, and the description covers the core mechanism. What is missing is operational context for a device-mutating tool: whether a port/device must be selected first, whether the UI state affects which event codes are valid, and what the agent should expect after a destructive press.

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%, so all five parameters (port, kb_char, touch_x, touch_y, event_code) are already documented with ranges and examples in the schema. The description adds no additional meaning about event_code name resolution, touch coordinates, or port auto-selection, so the baseline of 3 applies.

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 gives a specific verb and resource: 'Inject an InputBroker event (button / key / gesture) into the device UI', which tells an agent exactly what the tool produces. It does not, however, distinguish itself from plausible siblings such as mark_event or inject_frame, so an agent must infer the boundary.

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?

There is no explicit when-to-use or when-not-to-use guidance, and no alternative tool is named. 'Drives the same code path as a physical button press' is useful context about fidelity but is not routing guidance; an agent still has to guess whether this or mark_event is the right call.

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