Skip to main content
Glama

Create a relay session (host-client games only)

edgegap_create_relay_session

Creates a relay session for peer-to-peer or host-client multiplayer, returning the relay address and per-player authorization tokens so players can connect through a traffic-forwarding relay.

Instructions

A relay is NOT a game server and is not the recommended default — for a multiplayer match, deploy an authoritative dedicated server with edgegap_deploy instead. A relay only forwards traffic between players while one player's game acts as host and owns the game state: the host can cheat and has a latency advantage, the host's PC and connection cap the match, and the match ends if the host quits. Only use this when the developer has chosen peer-to-peer/host-client, or the netcode is already a listen server and a dedicated server is not an option; if that has not been established, ask first. Never pick it only because it needs no server image. Creates an Edgegap relay session for every player's public IP, host first, waits until it is ready, and returns the relay address plus per-player authorization tokens for the relay transport. Relay sessions are billed while open: delete test sessions with edgegap_delete_relay_session when finished.

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": {
      "user_ips": "<user_ips>"
    },
    "name": "edgegap_create_relay_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
dry_runNoShow the exact request (method, host, path, body) with secrets masked, and send nothing. Local checks still run. Use it to confirm a billable or destructive call before making it.
user_ipsYesPublic IP of each player, host first. Add late joiners with edgegap_authorize_relay_user.
webhook_urlNoCalled when the session is ready.
timeout_secondsNoDefault 30.
wait_until_readyNoPoll until the relay is assigned. Default true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.2
    • addedInput schema / properties / dry_run
      Added value: +{
      +  "description": "Show the exact request (method, host, path, body) with secrets masked, and send nothing. Local checks still run. Use it to confirm a billable or destructive call before making it.",
      +  "type": "boolean"
      +}
  2. Addedv0.2.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare readOnly=false, openWorld=true, idempotent=false, destructive=false. The description adds the material behavior the agent cannot infer: the call blocks until the relay is assigned, sessions are billed while open, tokens are returned per player, and relay transports carry host-authority/cheating/latency tradeoffs. These are exactly the facts that affect the decision to call.

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

Conciseness3/5

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

The content is valuable, but the structure is inverted: the first three sentences are disqualifiers and the actual operation is only described fourth. A reader scanning for 'what does this do' must read the whole block first. It is also longer than needed, with the host-advantage rationale stated at more length than a routing decision requires.

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

Completeness5/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 compensates by naming the return payload (relay address plus per-player authorization tokens). Combined with the billing/cleanup note, the prerequisite to confirm netcode, and the alternative deployment path, an agent has everything needed to decide and call correctly.

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

Parameters3/5

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

Schema coverage is 100%, so user_ips, dry_run, timeout_seconds, wait_until_ready and webhook_url are already documented in the schema. The description reinforces host-first ordering and the readiness wait but adds no syntax, format, or edge-case detail beyond what the schema fields already say, so the baseline applies.

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

Purpose5/5

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

States a specific verb and resource and pins down scope precisely: 'Creates an Edgegap relay session for every player's public IP, host first, waits until it is ready, and returns the relay address plus per-player authorization tokens.' It also explicitly distinguishes itself from edgegap_deploy, so an agent can route correctly without opening either schema.

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

Usage Guidelines5/5

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

Gives explicit when-to-use ('developer has chosen peer-to-peer/host-client, or the netcode is already a listen server'), when-not ('never pick it only because it needs no server image'), a named alternative (edgegap_deploy), an instruction to ask first if unestablished, and a cleanup path via edgegap_delete_relay_session. This is about as complete as routing guidance gets.

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