Skip to main content
Glama

Create a relay session (host-client games only)

edgegap_create_relay_session

Creates an Edgegap relay session for peer-to-peer multiplayer, registering the host's IP first, then returning the relay address and per-player tokens once ready.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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. Addedv0.2.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations cover openWorld/idempotent/destructive, but the description adds substantial context beyond them: the host-risk profile (host can cheat, has a latency advantage, host's PC caps the match, match ends if host quits), that the call blocks until ready, what is returned (relay address plus per-player authorization tokens), and that sessions are billed while open with a cleanup path via edgegap_delete_relay_session.

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 warnings are front-loaded and every sentence carries real decision weight for a high-stakes, billable, non-default tool. It is long and slightly repetitive about the host's role and the 'no server image' caution, but not padded in a way that harms comprehension.

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 still explains the return payload (relay address and per-player authorization tokens), the blocking behavior, billing implications, and the deletion follow-up. Nothing an agent needs to call and then manage this tool correctly is missing.

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 description coverage is 100%, so baseline is 3. The description reinforces the host-first ordering of user_ips and points to edgegap_authorize_relay_user for late joiners, but these details already live in the schema, so it adds little beyond it.

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?

The description states a specific verb and resource ('Creates an Edgegap relay session') and explicitly contrasts it with the sibling edgegap_deploy by declaring 'A relay is NOT a game server'. An agent can distinguish this tool from deployment tools without opening any 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?

It gives explicit when-to-use ('Only use this when the developer has chosen peer-to-peer/host-client, or the netcode is already a listen server'), when-not ('for a multiplayer match, deploy an authoritative dedicated server with edgegap_deploy instead'), a routing instruction to ask first if that hasn't been established, and an explicit anti-pattern ('Never pick it only because it needs no server image'). This is a complete routing guide.

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