Skip to main content
Glama

Generate a game server Dockerfile

edgegap_generate_dockerfile
Read-onlyIdempotent

Write a Dockerfile for this project's headless game server build, ready for Edgegap: linux/amd64 base, the build folder copied in, the binary made executable, the right headless flags (Unity -batchmode -nographics, Godot --headless), a…

Instructions

Write a Dockerfile for this project's headless game server build, ready for Edgegap: linux/amd64 base, the build folder copied in, the binary made executable, the right headless flags (Unity -batchmode -nographics, Godot --headless), a non-root user where the engine needs it (Unreal refuses root), CRLF fixes for start scripts, and EXPOSE lines matching the ports. Call this when the project has no Dockerfile, before building anything. Look at the build output first so you can pass the real build folder, binary name and port; anything you omit is assumed and listed under assumptions, which you must confirm with the developer or the project files. Write the result to Dockerfile, then build. The output is checked against edgegap_validate_server_config before it is returned. Makes no API calls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portsNoPorts the server listens on. Default: 7777, with the protocol the netcode uses (UDP if unknown).
engineYesGame engine of the server build.
netcodeNoNetworking transport, to pick the protocol. Known: mirror-kcp, kcp, mirror-telepathy, telepathy, mirror-simpleweb, simpleweb, websocket, fishnet-tugboat, tugboat, netcode-for-gameobjects, ngo, unity-transport, utp, photon-fusion, litenetlib, enet, unreal-netdriver, godot-enet, godot-websocket.
base_imageNoDefault "ubuntu:22.04".
build_pathNoServer build folder, relative to where docker build runs. Defaults: unity "Builds/EdgegapServer", unreal "." (run from inside the packaged LinuxServer folder), godot "build".
executableNoFile name of the server binary or start script inside build_path. Defaults: unity "ServerBuild", unreal "StartServer.sh", godot "server.x86_64". Required for "other".
launch_argsNoExtra server arguments, one per entry, e.g. ["-log", "-port=7777"].

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.2
    • addedInput schema / properties / ports / items / properties / tls_upgrade
      Added value: +{
      +  "description": "TLS Upgrade (wss/https) on a WS or HTTP port, for browser clients.",
      +  "type": "boolean"
      +}
  2. Addedv0.2.2

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/closed-world, but the description adds substantial behavior beyond them: engine-specific quirks (Unreal refuses root, Unity -batchmode -nographics, Godot --headless), CRLF fixing, and the assumption-listing contract for omitted parameters. It also states 'Makes no API calls' and that output is validated before return, which an agent needs to trust the result.

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?

Front-loaded with verb+artifact before the detail, and every clause is informational rather than filler. The primary sentence is an unusually long run-on list of generated content, which slightly hurts scanability but not correctness.

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?

Covers trigger, prerequisites, assumption handling, downstream validation and the fact that no API is called, which is thorough for a 7-parameter generation tool with no output schema. It does not explicitly state the returned payload shape or overwrite behavior if a Dockerfile already exists, a minor residual gap.

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%, so the schema documents defaults, enums and ranges for all seven parameters. The description still adds value by explaining the assumption mechanism for omitted values (they are assumed and surfaced for confirmation), which changes how an agent should treat partial input rather than just what the fields mean.

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 artifact (write a Dockerfile) for a defined resource (this project's headless game server build) and enumerates concrete content it will produce. It explicitly names a sibling, edgegap_validate_server_config, which the output is checked against, so an agent can place it relative to the rest of the toolset without opening schemas.

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 an explicit trigger and preconditions: 'Call this when the project has no Dockerfile, before building anything,' plus a preceding step ('Look at the build output first so you can pass the real build folder...'). It also routes the follow-up ('Write the result to Dockerfile, then build') and names the validation sibling, leaving little to inference.

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