Skip to main content
Glama
crosspad-mcp-server

crosspad-mcp-server

Official
by CrossPad

crosspad_input

Dispatch one input event to the running PC simulator—pad, encoder, click, drag, or key—and report click coordinates and hit object details.

Instructions

[PC sim] Send one input event to the running PC simulator (crosspad_run first): pad_press / pad_release, encoder_rotate / encoder_press / encoder_release, click, drag, key. action picks the event; fields it does not use are ignored. x, y (click) and x1..y2 (drag) are in LCD space by default (the 320x240 panel, as in a region='lcd' screenshot and the ENC_GROUP labels); space='window' means pixels of a region='full' capture. A click's reply reports where it landed in both spaces (window, lcd, in_lcd) and hit, the LVGL object class and LCD-space rect the press is delivered to (null = nothing under the pointer), so a click on empty background is not mistaken for one on a widget. A drag's reply comes at once, before the drag finishes (it takes ms + rest_ms); swipes (the top bar, the drawer) are drags, read the result with crosspad_stats view=top_bar.

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": {
      "action": "<action>"
    },
    "name": "crosspad_input"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNoRequired for action=click. X coordinate (0 = left) in `space`.
yNoRequired for action=click. Y coordinate (0 = top) in `space`.
msNoFor action=drag: how long the pointer takes from start to end (simulator default applies when omitted).
x1NoRequired for action=drag. Start X in `space`.
x2NoRequired for action=drag. End X in `space`.
y1NoRequired for action=drag. Start Y in `space`.
y2NoRequired for action=drag. End Y in `space`.
padNoRequired for action=pad_press|pad_release. Pad index 0-15.
portNoSimulator control port (default: CROSSPAD_REMOTE_PORT of this server, else 19840). Needed to address a second instance.
deltaNoRequired for action=encoder_rotate. Positive=CW, negative=CCW. Typical range -10..10.
spaceNoFor action=click: which space x,y are in. 'lcd' (default) = the 320x240 panel, as in a region='lcd' screenshot. 'window' = the whole emulator window, as in a region='full' screenshot.lcd
stepsNoFor action=drag: how many intermediate moves.
actionYesWhich input event to dispatch. Required params — pad_press: pad (velocity?); pad_release: pad; encoder_rotate: delta; encoder_press/encoder_release: (none); click: x,y; drag: x1,y1,x2,y2; key: keycode.
hold_msNoFor action=click: how long the button stays down. The simulator polls the pointer every ~30 ms, so 0 (press and release in one tick) is usually not seen as a click at all.
keycodeNoRequired for action=key. SDL keycode (e.g. 27=ESC, 32=SPACE, 13=RETURN).
rest_msNoFor action=drag: how long the pointer rests at the end before release. Longer than LVGL's momentum window, it lets go without a flick.
velocityNoOptional for action=pad_press (default 127). Ignored for other actions.

Output Schema

NameRequiredDescriptionDefault
docsNo
nextNo
errorNo
actionNo
noticeNo
successYes
responseNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv11.0.0
  2. Removedv10.2.0
  3. First observedv9.2.0

TDQS

A4.6/5.0
Behavior5/5

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

Well beyond the annotations (which only declare non-readonly, non-destructive), the description discloses that unused fields are ignored, that drags reply immediately before completing (ms + rest_ms), that clicks report window/lcd/in_lcd and the hit LVGL class with null for empty background, and that hold_ms=0 is often missed by the polling loop. These are exactly the non-obvious behaviors that prevent misinvocation.

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-loaded with the core action and prerequisite, then layered detail. It is a dense single paragraph and slightly run-on in places, but nearly every clause carries operational information and nothing is wasted.

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?

For a 17-parameter dispatch tool with an output schema, this covers coordinate spaces, per-action required fields, port addressing for multi-instance, and reply timing. An output schema exists, so return values need not be restated, yet the hit/space reporting is described because it affects interpretation of results.

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 100%, so the baseline is 3, but the description adds framing the schema does not: coordinates are in LCD space by default tied to a region='lcd' screenshot, space='window' maps to a region='full' capture, and the semantics of the early drag reply and rest_ms. It adds genuine meaning on top of the schema text.

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?

Opens with a specific verb and resource ("Send one input event to the running PC simulator") and enumerates every supported event type (pad_press/release, encoder_rotate/press/release, click, drag, key), which is exactly what an agent needs to tell it apart from crosspad_run or crosspad_capture.

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

Usage Guidelines4/5

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

Gives an explicit precondition ("crosspad_run first") and routes result verification to a sibling ("read the result with crosspad_stats view=top_bar"). It also clarifies that swipes are drags, which is a real when-to-use distinction. It stops short of stating when not to use this tool versus alternatives like a raw capture, so a 4 rather than 5.

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