Get a paste-ready client snippet
get_client_snippetReturns a complete client wired to this room. platform "web" (default): a single-file HTML game with realtime movement plus an anonymous (claimable) player, a saved color (datastore), and a click leaderboard; write it to disk and open it. platform "unity": one drop-in C# script for the Unity C# SDK (Unity 2021.2+) that boots itself on Play in an empty scene (realtime movement, remote smoothing, an event, reconnect hints). The game it is wired to is stamped in a comment at the top of the file.
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": {
"roomName": "<roomName>"
},
"name": "get_client_snippet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| game | No | Which game to act on: its publishable key (pk_…) or its exact name. Defaults to the x-mp-game header, then your primary game. | |
| platform | No | Client platform: "web" (default, the JS SDK for HTML / any web engine) or "unity" (the C# SDK, Unity 2021.2+). | |
| roomName | Yes | The room name. |