Skip to main content
Glama

inject_mouse_button

Destructive

Simulate mouse clicks in a running Unreal Engine PIE session by injecting button events into the PlayerController without moving the cursor, for testing. Press and release are separate calls.

Instructions

Fire a simulated mouse click at a running PIE session's PlayerController: fire/aim/interact without a human at the mouse. Press and release are SEPARATE calls, so a click is two of them and a hold is press now, release later. It injects the button only -- it does not move the cursor, so aim with set_control_rotation first. Requires an active PIE session; use inject_key_input for keyboard/gamepad buttons and click_pie_widget for UMG buttons, which this does NOT reach.

Returns: { injected: bool (the event was delivered to the controller, NOT that the game reacted -- verify with state), button: string, event: string, pie_client_index: int }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
eventNoOptional "Pressed" (default) or "Released". A full click needs both, in two calls.
buttonNoOptional "Left"|"Right"|"Middle" (default "Left"); anything else is a clean error.
pie_client_indexNoOptional int (default 0). Which PIE client window to aim at -- 0 is the server/host window in a ListenServer session, 1 the first client.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false/destructiveHint=true/idempotentHint=false, and the description adds critical behavioral context the annotations cannot: that a click is two separate calls, that it injects the button only and does NOT move the cursor, and that 'injected: true' means delivered not reacted. It stops short of disclosing side effects of the simulated click itself.

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?

Dense but front-loaded: capability, then press/release semantics, then the two constraints, then the returns summary. Nearly every sentence earns its place, though the closing returns block duplicates what could live in the schema.

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 zero-required-param input-injection tool with no output schema, the description covers prerequisites (active PIE), non-obvious count semantics (two calls per click), the aim/no-cursor caveat, sibling routing, and a return-value interpretation warning. Nothing an agent needs to call 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 coverage is 100%, so the schema already documents all three parameters including enum-ish value defaults. The description largely echoes the press/release split already in the schema's 'event' description, adding no new syntax. Baseline 3 is appropriate when the schema does the heavy lifting.

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 (fire/inject) and resource (mouse click button at a PIE session PlayerController), and explicitly differentiates from siblings: 'use inject_key_input for keyboard/gamepad buttons and click_pie_widget for UMG buttons, which this does NOT reach.' An agent can distinguish this from related input-injection tools 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?

Explicit when-to-use and when-not-use guidance: press/release are separate calls, aim with set_control_rotation first, requires an active PIE session, and routes to two named alternatives (inject_key_input, click_pie_widget). No inference required.

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

Deploy Server

Other Tools