retroarch_pause_toggle
Toggles pause state in RetroArch. Check current state with retroarch_get_status to know whether it will pause or unpause.
Instructions
Toggle the pause state. There's no separate pause/unpause command in the NCI — this single command flips the current state. Check retroarch_get_status first to know the current state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools.ts:227-227 (handler)The handler function (switch case) that executes the retroarch_pause_toggle tool by calling ra.pauseToggle() and returning success.
case "retroarch_pause_toggle": await ra.pauseToggle(); return ok("Pause toggled"); - src/tools.ts:102-106 (schema)The tool schema definition for retroarch_pause_toggle, including its name, description, and empty inputSchema.
{ name: "retroarch_pause_toggle", description: "Toggle the pause state. There's no separate pause/unpause command in the NCI — this single command flips the current state. Check `retroarch_get_status` first to know the current state.", inputSchema: { type: "object", properties: {} }, }, - src/tools.ts:176-177 (registration)The registerTools function registers all tools (including retroarch_pause_toggle) via ListToolsRequestSchema and handles calls via CallToolRequestSchema.
export function registerTools(server: Server, ra: RetroArchClient): void { server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS })); - src/retroarch.ts:191-191 (helper)The pauseToggle() method in RetroArchClient that sends the 'PAUSE_TOGGLE' command via fire-and-forget UDP.
async pauseToggle(): Promise<void> { await this.send("PAUSE_TOGGLE"); }