Skip to main content
Glama

Get a paste-ready client snippet

get_client_snippet
Read-only

Returns 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

NameRequiredDescriptionDefault
gameNoWhich game to act on: its publishable key (pk_…) or its exact name. Defaults to the x-mp-game header, then your primary game.
platformNoClient platform: "web" (default, the JS SDK for HTML / any web engine) or "unity" (the C# SDK, Unity 2021.2+).
roomNameYesThe room name.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / platform
      Added value: +{
      +  "description": "Client platform: \"web\" (default, the JS SDK for HTML / any web engine) or \"unity\" (the C# SDK, Unity 2021.2+).",
      +  "enum": [
      +    "web",
      +    "unity"
      +  ],
      +  "type": "string"
      +}
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds real substance on top: it enumerates the generated contents (realtime movement, anonymous claimable player, saved color, click leaderboard for web; remote smoothing, event, reconnect hints for Unity) and notes the Unity 2021.2+ floor and that the target game is stamped in a top comment. It could still say more about output size or failure modes, hence not a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The key claim ('a complete client wired to this room') is front-loaded, and the two platform branches are parallel and easy to scan. It is dense but nearly every clause carries information; the feature list inside each branch is where it starts to feel packed rather than trimmed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description carries the full burden of describing the return value, and it does so per platform in enough detail for an agent to decide whether to call it. Gaps are minor: nothing about output size, auth requirements, or what happens if the room name does not exist.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with per-parameter descriptions and an enum, so the baseline is 3. The description earns the bump by giving behavioral meaning to each platform value -- what 'web' actually produces versus what 'unity' actually produces -- which is more than the enum label conveys. It adds nothing about the game or roomName parameters beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource -- 'Returns a complete client wired to this room' -- and then spells out what that artifact is for each platform. An agent can immediately tell this emits runnable client code rather than reference docs. It stops short of a 5 because it never names the plausible siblings (get_sdk_reference, list_starters) that an agent might otherwise confuse it with.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is clear downstream usage guidance -- 'write it to disk and open it' for web, 'one drop-in C# script ... boots itself on Play in an empty scene' for Unity -- which tells the agent what to do with the result. However, it gives no when-to-use vs when-not-to-use guidance relative to sibling tools, and no prerequisites such as the room or game needing to already exist.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.