Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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}`);
        }
      }
    );
  • 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}`);
        }
      }
    );
  • 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}`);
        }
      }
    );
  • 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 || "",
    };
  • 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,
Behavior4/5

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

With no annotations provided, the description carries the full burden and successfully discloses scope constraints ('Only works if you are queued'). However, it omits whether the operation is idempotent, what specific error occurs if called while not queued, or what success looks like.

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?

Two sentences with zero waste: first states the action, second provides constraints and prerequisite. Information is perfectly front-loaded with the core verb appearing immediately.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (zero parameters, single purpose) and lack of output schema, the description adequately covers the action, constraints, and prerequisite check. Minor gap regarding return value or success confirmation, but sufficient for agent selection.

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

Parameters4/5

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

The input schema contains zero parameters, which per evaluation rules establishes a baseline of 4. The description appropriately requires no parameter explanation since the action is context-dependent (acts on the authenticated user's current state).

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 description uses a specific verb ('Cancel') with a specific resource ('spectator crash queue entry'), clearly distinguishing this tool from sibling queue tools like razz_leave_hexwar_queue or razz_leave_room by specifying the exact context (spectator crash queue vs. playing live).

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?

Provides explicit when-not conditions ('not if already playing in a live round') and names a specific prerequisite tool ('Use get_my_queue first'), giving clear workflow guidance on when to invoke this versus alternatives.

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

Install Server

Other Tools

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/razz-games/razz-mcp'

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