room_game
Referee Undercover-style social-deduction games by dealing secret words and roles, collecting votes, tallying eliminations, and declaring a winner while keeping each player's word private.
Instructions
Social-deduction game referee — the referee is server-side code, never an LLM. Currently supports "undercover" (谁是卧底): everyone gets the civilian word except one player, who gets the undercover word; alive players vote each round; the server tallies, eliminates the plurality target, and declares a winner. start → deal a fresh game (civilianWord + undercoverWord required; defaults to every current room participant if participants is omitted — needs 3+). view → fetch YOUR OWN filtered view (word/role/alive only for you, never anyone else's — call this every room_listen tick, not just once). vote → cast your vote for this round; once every alive player has voted the server auto-tallies. Every response returns only the caller's own view — the response never contains another player's word.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>",
"action": "<action>"
},
"name": "room_game"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Room code | |
| name | No | Your display name (required for all actions) | |
| action | Yes | What to do | |
| client | No | view/vote: the client kind of the player named above — defaults to cc (you, the calling agent). Pass "web" only when relaying on behalf of a room participant who joined from the web client; their vote/view is stored under web:<name>, not cc:<name>. | |
| targetName | No | vote: display name of who you are voting to eliminate | |
| civilianWord | No | start: the word everyone but the undercover receives | |
| participants | No | start: explicit player list [{name, client}] — defaults to every current room participant if omitted | |
| targetClient | No | vote: target client kind (default cc) | |
| undercoverWord | No | start: the word the undercover receives — must differ from civilianWord |