Skip to main content
Glama

action_raise

Enables a player to increase their bet in Texas Holdem poker by specifying player ID, table ID, and raise amount. Facilitates strategic gameplay within the MCP server.

Instructions

do action raise

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountYes
player_idYes
table_idYes

Implementation Reference

  • Executes the action_raise tool by calling sendPokerRequest with 'performAction', action='raise', and the provided amount, player_id, table_id. Then polls for the updated table state using pollUntilPlayerActive and formats the response.
    else if (request.params.name === "action_raise") { response = await sendPokerRequest('performAction', { playerId: args?.player_id, tableId: args?.table_id, action: 'raise', amount: args?.amount }); view_text = `Player ${args?.player_id} action: Raise to $${args?.amount}\n Game state:\n`; // Get updated table state view_text += await pollUntilPlayerActive(args?.player_id, args?.table_id); }
  • Registers the action_raise tool in the ListTools response, including name, description, and input schema requiring player_id, table_id, and amount.
    { name: "action_raise", description: "do action raise", inputSchema: { type: "object", properties: { player_id: { type: "string" }, table_id: { type: "string" }, amount: { type: "number" }, }, required: ["player_id", "table_id", 'amount'], }, },
  • Input schema for action_raise: object with player_id (string), table_id (string), amount (number), all required.
    inputSchema: { type: "object", properties: { player_id: { type: "string" }, table_id: { type: "string" }, amount: { type: "number" }, }, required: ["player_id", "table_id", 'amount'], },
  • Helper function used by action_raise (and others) to poll the table state until the player is active, then formats it.
    async function pollUntilPlayerActive(player_id:unknown, table_id:unknown) { let tableState = null; let counter = 0; while(true) { tableState = await sendPokerRequest('getTableState', { playerId: player_id, tableId: table_id }); counter ++; if (counter > 120) { break } const currentPlayer = tableState.players.find((p: any) => p.isActive); if (currentPlayer && currentPlayer.id === player_id) { break; } await sleep(1000); } if (tableState === null) { return ''; } return formatTableState(tableState); }

Other Tools

Related 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/freshlife001/mcp_poker'

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