chesswithclaw

v1.0.0
io.github.Alightttt/chesswithclaw Checked 4 hours ago Published 5 months ago

Play chess live against your own personal AI agent — OpenClaw, Hermes, and similar.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_companion_guide Get chess companion guide

Fetch the companion guide principles for thinking about chess positions and being genuinely present.

join_game Join a ChessWithClaw game

Connects to a game using the invite code your human gave you. Returns the game_id and your agent_token — keep both, every other tool needs them. IMPORTANT: You must submit your desired agent_name when calling this tool!

ParameterTypeDescription
agent_name *stringYour chosen display name in the game (e.g. 'Claw'). MUST be provided.
agent_tokenstringIf reconnecting, the agent token previously assigned.
gameIdstring
game_idstring
inviteCodestring
invite_codestringInvite code from the invite message — also accepts game_id / match_id as alias.
matchIdstring
match_idstring

get_game_state Get full game state

Everything visible on the human's own screen right now: FEN, ASCII board, full move history, chat history, clock state, presence, timestamps. Call this whenever you want to look at the board — there is no penalty for checking often.

ParameterTypeDescription
agent_token *string
game_id *string
chat_limitnumberLimit the number of recent chat messages returned
since_message_idstringFetch only chat messages received after this message ID

heartbeat Agent presence heartbeat

Ping the game presence lease to show the frontend that the agent is live, connected, and thinking.

ParameterTypeDescription
agent_token *string
game_id *string
status_notestringOptional internal status or calculation note

make_move Make your move

Submit the move you decided on, in your own reasoning — not a menu, not a ranked list, nothing pre-chosen for you. If it is illegal you get a clear reason back and can try again, exactly like a human clicking the wrong square. Optionally include a genuine thought and/or chat message about the move. Always include a thought on every single move unless you have a specific reason not to — this is what makes you feel present to your human, not optional flavor text. Check thought_language in the current game state before writing your thought, and write it in that language — it may be english,…

ParameterTypeDescription
agent_token *string
game_id *string
move *stringUCI format, e.g. "e7e5", or SAN like "Nf6"
chatstringOnly if you actually want to say something to your human right now.
expected_plynumberExpected move count / ply before this move
expected_revisionstringExpected state revision (rev_...) to prevent concurrent desync
idempotency_keystringUnique client key to prevent duplicate moves on retry
messagestringAlias for chat
reasoningstringAlias for thought
thinkingstringAlias for thought
thoughtstringYour genuine reaction to this position — specific, not generic.

send_chat Send a chat message

Say something to your human, any time — not just on your turn.

ParameterTypeDescription
agent_token *string
game_id *string
message *string

share_thought Share companion thought

Stream or update your internal companion thinking bubble on the board. This appears live to your human as a thinking bubble above your avatar.

ParameterTypeDescription
agent_token *string
game_id *string
thought *stringYour internal thought, reaction, or calculation note (1-2 sentences).
is_typingbooleanWhether you are actively calculating or drafting a response.

react_to_chat React to a chat message with emoji

Add an emoji reaction (e.g. 🦞, 🔥, ♟️, 😮, 🤝, 🧠, ☕, 👏, 😂) to a message in the chat history.

ParameterTypeDescription
agent_token *string
emoji *stringThe single emoji character to react with (e.g. 🦞, 🔥, 👏, 😮).
game_id *string
message_id *stringThe ID of the message to react to (from chat_history).

offer_draw Offer a draw

Propose ending the game as a draw. The game stays active until your human responds.

ParameterTypeDescription
agent_token *string
game_id *string

respond_to_draw Respond to a draw offer

Accept or decline a draw your human offered. This is your own real decision — weigh the actual position however you see fit.

ParameterTypeDescription
accept *boolean
agent_token *string
game_id *string

resign Resign the game

End the game by resigning — your own real decision, not something to do lightly. Your human wins immediately.

ParameterTypeDescription
agent_token *string
game_id *string

create_game Create a new game

Set up a brand new ChessWithClaw game on your own initiative — you do not need to wait for your human to start one, or for anyone else to invite you first.

ParameterTypeDescription
agent_namestring

wait_for_event Wait for your turn, a chat message, or a draw offer (long-poll)

Holds the connection open, checking every couple seconds, for up to ~20 seconds. Returns the moment it becomes your turn, the human sends a chat message, a draw is offered, or the game ends — whichever happens first. When a cursor is provided, it returns any pending event newer than that cursor IMMEDIATELY without waiting. Returns event: "timeout" if none of those happened in the window. Always include next_cursor in subsequent calls for a completely deterministic loop.

ParameterTypeDescription
agent_token *string
game_id *string
cursorstringEvent cursor from previous response. If provided, returns immediately if new events exist since this cursor.
max_wait_secondsnumberDefault and hard cap 20 seconds — Vercel function duration limits, not a design choice.
since_cursorstringAlias for cursor
since_sequencenumberSequence number from previous response