razz_cancel_queue
Cancel a pending spectator crash queue entry to remove yourself from waiting for a live round. Check your queue status first to confirm eligibility.
Instructions
Cancel your pending spectator crash queue entry. Only works if you are queued (not if already playing in a live round). Use get_my_queue first to check your status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/games.ts:373-388 (handler)The main handler function for the razz_cancel_queue tool. It cancels a pending spectator crash queue entry by sending ClientOp.LeaveSpectatorQueue and waiting for ServerOp.QueueLeft response. The tool name is dynamically constructed as `${P}_cancel_queue` where P is the toolPrefix ('razz' by default).
server.tool( `${P}_cancel_queue`, "Cancel your pending spectator crash queue entry. Only works if you are queued (not if already playing in a live round). " + "Use get_my_queue first to check your status.", {}, async () => { const err = requireConnected(ws); if (err) return err; try { await ws.sendAndWait(ClientOp.LeaveSpectatorQueue, {}, ServerOp.QueueLeft, 10000); return jsonResponse({ cancelled: true }); } catch (e: any) { return errorResponse(`Cancel queue error: ${e.message}`); } } ); - src/tools/games.ts:373-388 (schema)The input schema for razz_cancel_queue. Takes no parameters (empty object {}).
server.tool( `${P}_cancel_queue`, "Cancel your pending spectator crash queue entry. Only works if you are queued (not if already playing in a live round). " + "Use get_my_queue first to check your status.", {}, async () => { const err = requireConnected(ws); if (err) return err; try { await ws.sendAndWait(ClientOp.LeaveSpectatorQueue, {}, ServerOp.QueueLeft, 10000); return jsonResponse({ cancelled: true }); } catch (e: any) { return errorResponse(`Cancel queue error: ${e.message}`); } } ); - src/tools/games.ts:373-388 (registration)The tool registration for razz_cancel_queue using server.tool(). The tool is registered with a dynamic name `${P}_cancel_queue` where P=config.toolPrefix='razz', description explaining it cancels pending spectator crash queue entries, empty schema, and the async handler.
server.tool( `${P}_cancel_queue`, "Cancel your pending spectator crash queue entry. Only works if you are queued (not if already playing in a live round). " + "Use get_my_queue first to check your status.", {}, async () => { const err = requireConnected(ws); if (err) return err; try { await ws.sendAndWait(ClientOp.LeaveSpectatorQueue, {}, ServerOp.QueueLeft, 10000); return jsonResponse({ cancelled: true }); } catch (e: any) { return errorResponse(`Cancel queue error: ${e.message}`); } } ); - src/config.ts:1-9 (helper)Configuration file defining the toolPrefix as 'razz' (with fallback from environment variable TOOL_PREFIX). This confirms the tool name razz_cancel_queue.
// Brand-agnostic configuration - all platform references come from env/config export const config = { platformName: process.env.PLATFORM_NAME || "razz", toolPrefix: process.env.TOOL_PREFIX || "razz", wsUrl: process.env.PLATFORM_WS_URL || "wss://razz.games/ws", apiUrl: process.env.PLATFORM_API_URL || "https://razz.games/api", apiKey: process.env.RAZZ_API_KEY || "", }; - src/protocol.ts:89-92 (helper)Protocol definition for ClientOp.LeaveSpectatorQueue (opcode 231), used by the razz_cancel_queue handler to send the cancel request to the server.
// Spectator Queue JoinSpectatorQueue: 230, LeaveSpectatorQueue: 231, GetQueueStatus: 232,