Skip to main content
Glama

play_and_capture

Automate Pyxel game testing by simulating keyboard/mouse input at specific frames and capturing screenshots to verify input-dependent logic without manual play.

Instructions

Play a game by sending simulated input and capture screenshots.

Simulates keyboard/mouse input at specific frames and captures screenshots at specified frame points. Use this to test input-dependent game logic (menus, movement, shooting) without manual play.

Args: script_path: Absolute path to the .py script to run. inputs: JSON array of input events. Each event: {"frame": N, "keys": ["KEY_SPACE", ...], "mouse_x": X, "mouse_y": Y} Keys are held from their frame until a later entry changes them. Default state: no keys pressed, mouse at (0,0). frames: Comma-separated frame numbers to capture screenshots (default: "1,30,60"). scale: Screenshot scale multiplier (default: 1). timeout: Maximum seconds to wait for the script (default: 30).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
script_pathYes
inputsYes
framesNo1,30,60
scaleNo
timeoutNo

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kitao/pyxel-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server