Skip to main content
Glama

Generate a game server Dockerfile

edgegap_generate_dockerfile
Read-onlyIdempotent

Writes a Dockerfile for a project's headless game server build, ready for Edgegap, with engine-specific flags, ports, and non-root user settings.

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. Addedv0.2.2

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint/openWorldHint=false, and the description reinforces this with 'Makes no API calls' – explaining why a 'write' tool is read-only (it emits a local file). It also discloses the validation step against edgegap_validate_server_config and the assumption-reporting behavior. Minor gap: it doesn't say what happens if required build info is missing beyond 'listed under assumptions', nor what the returned text looks like.

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?

One dense paragraph that front-loads the action and the output contents before moving to preconditions and follow-ups. Every clause carries information, though the mid-sentence list of engine flags and file-system details makes it slightly run-on compared with a tighter two- or three-sentence split.

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?

No output schema exists, but the description explains what the generated artifact contains, where it is written, that it is checked against edgegap_validate_server_config before return, and that assumptions must be confirmed. For a generator tool with only one required parameter, nothing an agent needs to invoke it correctly is missing.

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 baseline is 3, but the description adds cross-parameter behavior the schema cannot express: omitted values become assumptions that must be confirmed, and the engine choice drives defaults for build path, executable and headless flags. It does not re-explain the port/netcode lists, which the schema already covers.

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 this project's headless game server build, ready for Edgegap') and enumerates the exact contents it produces (base image, build folder, binary permissions, headless flags, non-root user, CRLF fixes, EXPOSE). This is clearly distinguishable from siblings like edgegap_create_app_version or edgegap_validate_server_config.

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?

Explicit trigger ('Call this when the project has no Dockerfile, before building anything'), explicit precondition ('Look at the build output first so you can pass the real build folder, binary name and port'), and an explicit follow-up path (write to Dockerfile, then build). Usage is fully determined.

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