Skip to main content
Glama
EL4CTEO

Roblox Studio MCP

Send keyboard and mouse input

input

Send real keyboard and mouse events to a live playtest to test any input-bound control, from pressing E to open doors to sprinting. Confirms the action actually triggers.

Instructions

Sends real keyboard and mouse input to a running playtest — the same events a person pressing the keys would produce.

This is how to test what character cannot reach. character drives the Humanoid directly, which answers 'can it get to the door'; this answers 'does pressing E open it', 'does the sprint key work' — anything bound to input rather than to movement. Use character for going places and this for controls.

Roblox reserves some keys for its own menus and refuses to send them — Escape, Tab, F9, and others depending on the place (One is the backpack hotbar). A refused key comes back as a WARNING naming it; the other steps still run.

Steps run in order, so a sequence is one call: tap E, wait, click at a point, type a name. hold is how long a key or button stays down, after is how long to wait before the next step — a jump held for a second is a different test from a tapped one.

REQUIRES A RUNNING PLAYTEST, and must be addressed to the playtest's studioId from list_studios, not the editor's.

A pointer is drawn on screen and travels to each target before the click, so the user can see what you are aiming at. Turn it off with cursor: false.

How it works, because it explains the one thing that will surprise you: input belongs to the data model that creates it, and the character is driven by the CLIENT. Sending from the playtest's server succeeds and moves nothing. So this parents a short script into the player's PlayerGui, which runs on their client, and that reports back when the input has actually been delivered. Nothing is reported as sent until the client confirms it. If confirmation never arrives you get an error, not a success — check where things really are with character op="state".

Mouse coordinates are viewport pixels from the top-left, so pair this with screenshot to see what is where before clicking it, and send what you read off the picture unchanged. The reply's landed shows the same click in the game's own coordinates, which sit a topbar lower — that difference is two ways of describing one point, not an error to correct for. Under an emulated device it is a real distortion instead, and the reply says so; there, re-read it after each click rather than reusing an earlier one.

Take the screenshot immediately before clicking. The reply is measured against the viewport as it is NOW, and a Studio window that changed size since the picture was taken moves everything in it — measured, a window that went from 435 to 952 pixels wide between a screenshot and a click, where the click reported success and hit nothing.

A text step types into the FOCUSED TextBox. Click the box in the same call, one step before the text, and the focus is taken for you; with no box to type into the step is reported as having done nothing rather than as delivered.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stepsYesInput steps, delivered in order.
cursorNoDraw a pointer on screen that travels to each target before the click, with a ripple where it lands. On by default: synthetic input is otherwise invisible, so the user watching sees effects with no cause, and a click that misses looks identical to one that hit. Turn it off only when recording something where the pointer would be in the way.
playerNoWhich player, by name. Omit for the only one; needed in a multiplayer test.
studioIdNoThe PLAYTEST session's id — not the editor's. See list_studios.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.7.5
    • addedInput schema / properties / steps / items / properties / target
      Added value: +{
      +  "description": "click/text only: client GUI path, e.g. PlayerGui.HUD.BuyButton. Clicks its centre; focuses TextBoxes before typing.",
      +  "minLength": 1,
      +  "type": "string"
      +}
  2. Changed1 schema field changedv0.7.1
    • changedInput schema / properties / steps / items / properties / key / description
      Previous value: -"key only: an Enum.KeyCode name — \"W\", \"Space\", \"E\", \"LeftShift\", \"Escape\"."New value: +"key only: an Enum.KeyCode name — \"W\", \"Space\", \"E\", \"LeftShift\"."
  3. Changed1 schema field changedv0.3.7
    • changedInput schema / properties / steps / items / properties / text / description
      Previous value: -"text only: the string to type."New value: +"text only: the string to type. Goes to the focused TextBox — click it first, in the same call."
  4. First observedv0.1.8

TDQS

A5/5.0
Behavior5/5

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

Even with annotations present, the description adds a large amount of behavioral context: reserved keys are refused with a warning, steps execute in order, delivery is confirmed by the client before success is reported, failure produces an error, and input is parented into the client's PlayerGui. It also discloses pointer drawing, viewport measurement pitfalls, and emulated-device distortion, all beyond what the annotations state.

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?

The description is long but appropriately so for a high-complexity tool with no output schema. It is front-loaded with the core purpose and then organized into clearly motivated sections covering alternatives, reserved keys, sequencing, client execution, pointer behavior, screenshot timing, and text focus — each of which earns its place by preventing a likely misinvocation.

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?

Given the tool's complexity, 4 parameters, and absent output schema, the description is remarkably complete. It covers prerequisites, return and error semantics, ordering, coordinate systems, failure modes, and interactions with siblings like `character` and `screenshot`, leaving no critical gap an agent would need to guess about.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although schema coverage is 100%, the description adds meaning well beyond the schema: x/y are viewport pixels from the top-left, `after` and `hold` control sequencing and duration, `target` focuses TextBoxes, `cursor` defaults to on so users can see synthetic input, and `text` types into the focused TextBox. It even explains coordinate discrepancies between the reply's `landed` and viewport pixels so the agent does not treat them as an error.

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?

The first sentence states a specific verb and resource: sends real keyboard and mouse input to a running playtest, producing the same events as a person. It also explicitly distinguishes itself from the sibling `character` tool by contrasting 'can it get to the door' with 'does pressing E open it', so an agent can tell them apart without opening schemas.

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?

The description gives explicit selection guidance: use `character` for movement and this tool for controls, and pair it with `screenshot` for coordinate targeting. It also specifies the prerequisite of a running playtest and warns that the playtest's studioId from `list_studios` must be used, not the editor's.

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