action_fold
Fold a player's hand in a Texas Holdem poker game using the MCP server API. Specify the player ID and table ID to execute the fold action.
Instructions
do action fold
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| player_id | Yes | ||
| table_id | Yes |
Implementation Reference
- src/mcpServer.ts:255-265 (handler)Executes the 'action_fold' tool by sending a 'performAction' request with action 'fold' to the poker server, then polls for updated table state and formats the response.else if (request.params.name === "action_fold") { response = await sendPokerRequest('performAction', { playerId: args?.player_id, tableId: args?.table_id, action: 'fold' }); view_text = `Player ${args?.player_id} action: Fold\n Game state:\n`; // Get updated table state view_text += await pollUntilPlayerActive(args?.player_id, args?.table_id); }
- src/mcpServer.ts:90-101 (registration)Registers the 'action_fold' tool in the list of available tools, including its description and input schema.{ name: "action_fold", description: "do action fold", inputSchema: { type: "object", properties: { player_id: { type: "string" }, table_id: { type: "string" }, }, required: ["player_id", "table_id"], }, },
- src/mcpServer.ts:93-99 (schema)Defines the input schema for the 'action_fold' tool, requiring player_id and table_id as strings.inputSchema: { type: "object", properties: { player_id: { type: "string" }, table_id: { type: "string" }, }, required: ["player_id", "table_id"],